Skip to content

Commit

Permalink
lint .mjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed May 10, 2020
1 parent 37800fd commit f3581c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ typecheck:
dtslint --expectOnly types

lint-ci:
eslint --ignore-pattern test/fixtures/* src test
eslint --ext .js,.mjs --ignore-pattern test/fixtures/* src test
prettier *.md docs/*.md docs/**/*.md

lint:
eslint --cache --fix --ignore-pattern test/fixtures/* src test
eslint --cache --fix --ext .js,.mjs --ignore-pattern test/fixtures/* src test
prettier --write *.md docs/*.md docs/**/*.md

coverage:
Expand Down
4 changes: 2 additions & 2 deletions test/client.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fetchMock from '../esm/client.js';
import {expect} from 'chai';
import runner from './runner.js';
import clientOnly from './specs/client-only.test.js';
clientOnly(fetchMock)

clientOnly(fetchMock);
runner(fetchMock, window, window.fetch, window.AbortController);
25 changes: 2 additions & 23 deletions test/server.mjs
Original file line number Diff line number Diff line change
@@ -1,31 +1,10 @@
import fetchMock from '../esm/server.js';
import {expect} from 'chai';
import http from 'http';
import sinon from 'sinon';
import { promisify } from 'util';
import runner from './runner.js';
import fetch from 'node-fetch';
import AbortController from 'abort-controller';
import serverOnly from './specs/server-only.test.js';

describe('nodejs tests', () => {
let server;
before(() => {
server = http.createServer((req, res) => {
res.writeHead(200);
res.end();
});
return promisify(server.listen.bind(server))(9876);
});
after(() => {
server.close();
});

runner(
fetchMock,
global,
fetch,
AbortController
);
serverOnly(fetchMock)
runner(fetchMock, global, fetch, AbortController);
serverOnly(fetchMock);
});

0 comments on commit f3581c7

Please sign in to comment.