mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-29 09:27:16 +09:00
[WIP] test
This commit is contained in:
parent
6dfe2912a3
commit
d14e72b01b
@ -12,12 +12,16 @@
|
||||
"build": "gulp build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "3.4.34",
|
||||
"@types/debug": "0.0.29",
|
||||
"@types/mocha": "2.2.39",
|
||||
"@types/node": "7.0.5",
|
||||
"@types/request": "0.0.39",
|
||||
"chai": "3.5.0",
|
||||
"event-stream": "3.3.4",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-typescript": "3.1.4",
|
||||
"mocha": "3.2.0",
|
||||
"typescript": "2.1.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
21
test/index.ts
Normal file
21
test/index.ts
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Tests!
|
||||
*/
|
||||
|
||||
import http from 'http';
|
||||
import chai from 'chai';
|
||||
import summaly from '../';
|
||||
|
||||
Error.stackTraceLimit = Infinity;
|
||||
|
||||
// During the test the env variable is set to test
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
// Display detail of unhandled promise rejection
|
||||
process.on('unhandledRejection', console.dir);
|
||||
|
||||
const should = chai.should();
|
||||
|
||||
it('well-defined meta site', async () => {
|
||||
should.equal(await summaly('localhost:0'), 'hoge');
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user