This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test with append/prepend middleware * Add eventlistener
- Loading branch information
Showing
4 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Mocha Tests</title> | ||
<link rel="stylesheet" href="mocha.css" /> | ||
</head> | ||
<body> | ||
<div id="mocha"></div> | ||
<script src="expect.js"></script> | ||
<script src="mocha.js"></script> | ||
<script>mocha.setup('bdd')</script> | ||
<script src="test.middleware.js"></script> | ||
<script> | ||
mocha.checkLeaks(); | ||
mocha.run(); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(function() { | ||
var CORS_SERVER; | ||
|
||
CORS_SERVER = 'localhost:9292'; | ||
|
||
describe('CORS-INVALID', function() { | ||
return it('should allow access to invalid auth resource', function(done) { | ||
return fetch(`http://${CORS_SERVER}/protected`, { | ||
method: 'GET', | ||
mode: 'cors' | ||
}).then((response) => { | ||
expect(response.status).to.eql(401); | ||
return done(); | ||
}) | ||
}); | ||
}); | ||
|
||
}).call(this); |