-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1663bf6
commit 9cc86fe
Showing
5 changed files
with
43 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script src="/tester.js"></script> | ||
<script src="/index.js"></script> | ||
<script> | ||
let api = new API('.'); | ||
api.what_the_fuck.get().catch(content => { | ||
Tester.feedback(true); | ||
}); | ||
</script> |
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,8 @@ | ||
<script src="/tester.js"></script> | ||
<script src="/index.js"></script> | ||
<script> | ||
let api = new API('.'); | ||
api.what_the_fuck.get({ rawResponse: true }).then(response => { | ||
Tester.feedback(response.status === 404); | ||
}); | ||
</script> |
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,13 @@ | ||
<script src="/tester.js"></script> | ||
<script src="/index.js"></script> | ||
<script> | ||
let api = new API(); | ||
api = location.pathname.match(/[^/]+/g).reduce((api, name) => api[name], api); | ||
api.get({ rawResponse: true }).then(async response => { | ||
let result = await response.auto(); | ||
Tester.assert(response.ok); | ||
Tester.assert(response.status === 200); | ||
Tester.assert(result === document.head.innerHTML); | ||
Tester.feedback(true); | ||
}); | ||
</script> |
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,12 @@ | ||
<script src="/tester.js"></script> | ||
<script src="/index.js"></script> | ||
<script> | ||
let api = new API('.'); | ||
api['test.json'].get({ rawResponse: true }).then(async response => { | ||
let result = await response.auto(); | ||
Tester.assert(response.ok); | ||
Tester.assert(response.status === 200); | ||
Tester.assert(result.text === 'apisdk'); | ||
Tester.feedback(true); | ||
}); | ||
</script> |