mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40: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:
committed by
Felipe Martins
parent
189b34c45a
commit
494d817314
+1
-1
@@ -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
|
||||||
|
|||||||
@@ -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')
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user