Skip to content

Commit

Permalink
refactor: run prettier (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored May 1, 2019
1 parent c03cef2 commit 0f14d2b
Show file tree
Hide file tree
Showing 10 changed files with 1,470 additions and 1,127 deletions.
2 changes: 1 addition & 1 deletion browser-test/browser-test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function main() {

const server = await listen(app, port);
console.log(`[http server] I'm listening on port ${port}! Starting karma.`);
const result = await execa('karma', ['start'], { stdio: 'inherit' });
const result = await execa('karma', ['start'], {stdio: 'inherit'});
server.close();
console.log(
`[http server] Karma has finished! I'm no longer listening on port ${port}!`
Expand Down
6 changes: 3 additions & 3 deletions browser-test/test.browser.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import assert from 'assert';

import { request } from '../src/index';
import {request} from '../src/index';
const port = 7172; // should match the port defined in `webserver.ts`

describe('💻 browser tests', () => {
it('should just work from browser', async () => {
const result = await request({ url: `http://localhost:${port}/path` });
const result = await request({url: `http://localhost:${port}/path`});
assert.strictEqual(result.status, 200);
assert.strictEqual(result.data, 'response');
});

it('should pass querystring parameters from browser', async () => {
const result = await request({
url: `http://localhost:${port}/querystring`,
params: { query: 'value' },
params: {query: 'value'},
});
assert.strictEqual(result.status, 200);
assert.strictEqual(result.data, 'value');
Expand Down
Loading

0 comments on commit 0f14d2b

Please sign in to comment.