Skip to content

Commit

Permalink
test: fix tsc test case (#1620)
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Nov 7, 2017
1 parent 6804bd3 commit fd1ff63
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/ts/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ const runscript = require('runscript');
const path = require('path');
const utils = require('../utils');
const baseDir = path.join(__dirname, '../fixtures/apps/app-ts');
const fs = require('fs');
const mkdirp = require('mz-modules/mkdirp');
const rimraf = require('mz-modules/rimraf');

describe('test/ts/index.test.js', () => {
before(function* () {
if (process.env.CI) {
yield runscript('tsc && npmlink ../../../../', { cwd: baseDir });
} else {
yield runscript('tsc && npm link ../../../../', { cwd: baseDir });
}
yield runscript('tsc', { cwd: baseDir });
const dest = path.join(baseDir, 'node_modules/egg');
yield rimraf(dest);
yield mkdirp(path.dirname(dest));
fs.symlinkSync('../../../../../', dest);
});

describe('compiler code', () => {
Expand All @@ -38,4 +41,3 @@ describe('test/ts/index.test.js', () => {
});

});

0 comments on commit fd1ff63

Please sign in to comment.