Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): upgrade to the latest version of gts #83

Merged
merged 2 commits into from
Apr 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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