We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f68d40b commit 9c55bc9Copy full SHA for 9c55bc9
test/client.test.js
@@ -0,0 +1,11 @@
1
+const HTTPFSAClient = require('../lib/client')
2
+
3
+it('Throws without passing endpoint', () => {
4
+ expect(() => new HTTPFSAClient()).toThrow('Missing required option `endpoint`')
5
+})
6
7
+it('Throws on unexpected status code', async () => {
8
+ const client = new HTTPFSAClient({ endpoint: 'http://' })
9
+ client._request = () => Promise.resolve({ status: 500 })
10
+ await expect(client.exists('/')).rejects.toThrow('Error: Unexpected status 500')
11
test/index.test.js renamed to test/e2e.test.js
0 commit comments