2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Change syntax to see if build passes (#2488)

* Change syntax to see if build passes

* Test commit

* Test with node 10

* Test adding all browsers in travis

* remove other browsers when running on travis
This commit is contained in:
Yasu Flores
2019-10-25 07:25:53 -07:00
committed by Felipe Martins
parent 189b34c45a
commit 494d817314
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ services:
- xvfb - xvfb
language: node_js language: node_js
node_js: node_js:
- node - 10
email: email:
on_failure: change on_failure: change
on_success: never on_success: never
+4 -3
View File
@@ -10,7 +10,8 @@ describe('helpers::isURLSameOrigin', function () {
}); });
it('should detect XSS scripts on a same origin request', function () { it('should detect XSS scripts on a same origin request', function () {
expect(() => { isURLSameOrigin('https://github.com/axios/axios?<script>alert("hello")</script>'); }) expect(function() {
.toThrowError(Error, 'URL contains XSS injection attempt') isURLSameOrigin('https://github.com/axios/axios?<script>alert("hello")</script>');
}) }).toThrowError(Error, 'URL contains XSS injection attempt')
});
}); });