Skip to content

Commit

Permalink
fix(deps): upgrade to the latest version of gts (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Apr 26, 2019
1 parent a8297c6 commit 650497b
Show file tree
Hide file tree
Showing 16 changed files with 1,054 additions and 539 deletions.
3 changes: 0 additions & 3 deletions .clang-format

This file was deleted.

10 changes: 6 additions & 4 deletions browser-test/browser-test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import http from 'http';
const port = 7172;

async function listen(
app: express.Express, port: number): Promise<http.Server> {
app: express.Express,
port: number
): Promise<http.Server> {
return new Promise((resolve, reject) => {
const server = app.listen(port, (err: Error) => {
if (err) {
Expand Down Expand Up @@ -49,11 +51,11 @@ 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}!`);
`[http server] Karma has finished! I'm no longer listening on port ${port}!`
);
process.exit(result.failed ? 1 : 0);
}

Expand Down
8 changes: 4 additions & 4 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';
const port = 7172; // should match the port defined in `webserver.ts`
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 650497b

Please sign in to comment.