Move tests
This commit is contained in:
parent
53df4c6e3f
commit
69f55aadc7
4 changed files with 5 additions and 7 deletions
|
@ -11,7 +11,7 @@
|
|||
"postinstall": "typings install",
|
||||
"build": "tsc",
|
||||
"test": "npm run build && npm run mocha && nsp check",
|
||||
"mocha": "mocha --compilers ts:ts-node/register --require scripts/test-helper.js src/__tests__/**.test.ts",
|
||||
"mocha": "mocha --compilers ts:ts-node/register --require scripts/test-helper.js tests/**.test.ts",
|
||||
"lint": "tslint src/**/*.ts"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import createServer from '../server';
|
||||
import { Options } from '../types';
|
||||
import createServer from '../src/server';
|
||||
import { Options } from '../src/types';
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
|
||||
|
||||
export function runServer(opts: Object, url : string, callback: Function) {
|
||||
const app = createServer(opts as Options);
|
||||
const server = app.listen(1234, function () {
|
|
@ -39,7 +39,7 @@ describe('Server', function () {
|
|||
});
|
||||
|
||||
describe('index route', function () {
|
||||
const body = fs.readFileSync(__dirname + '/../../site/index.html').toString();
|
||||
const body = fs.readFileSync(__dirname + '/../site/index.html').toString();
|
||||
|
||||
['', '/', '/index.html'].forEach(function (path : string) {
|
||||
it('should render ' + path, function (done) {
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitAny": true,
|
||||
"experimentalDecorators": true,
|
||||
|
@ -18,7 +17,7 @@
|
|||
"dist",
|
||||
"node_modules",
|
||||
"scripts/",
|
||||
"src/__tests__"
|
||||
"tests/"
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules",
|
||||
|
|
Reference in a new issue