-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37800fd
commit f3581c7
Showing
3 changed files
with
6 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |