Skip to content

Commit

Permalink
Test a real multinet property
Browse files Browse the repository at this point in the history
  • Loading branch information
waxlamp committed Mar 18, 2021
1 parent f46df0c commit 5523801
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/multinet.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { multinetApi } from '../src/index';
import { AxiosError } from 'axios';

function add(a: number, b: number): number {
return a + b + 1;
}
const badApi = multinetApi('http://example.com');

test('hello world', () => {
expect(add(3, 4)).toBe(7);
test('general', async () => {
expect(badApi).toEqual(expect.anything());

// The "bad api" object should fail when invoked.
await expect(badApi.workspaces())
.rejects
.toHaveProperty('isAxiosError', true);
});

0 comments on commit 5523801

Please sign in to comment.