Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change syntax to see if build passes #2488

Merged
merged 5 commits into from Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,7 +2,7 @@ services:
- xvfb
language: node_js
node_js:
- node
- 10
email:
on_failure: change
on_success: never
Expand Down
7 changes: 4 additions & 3 deletions test/specs/helpers/isURLSameOrigin.spec.js
Expand Up @@ -10,7 +10,8 @@ describe('helpers::isURLSameOrigin', function () {
});

it('should detect XSS scripts on a same origin request', function () {
expect(() => { isURLSameOrigin('https://github.com/axios/axios?<script>alert("hello")</script>'); })
.toThrowError(Error, 'URL contains XSS injection attempt')
})
expect(function() {
isURLSameOrigin('https://github.com/axios/axios?<script>alert("hello")</script>');
}).toThrowError(Error, 'URL contains XSS injection attempt')
});
});