aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/test_installation.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-12 08:26:42 +0800
committerGitHub <noreply@github.com>2018-04-12 08:26:42 +0800
commit749354b1c04f45a30086163ec221695705dcab42 (patch)
tree264a89829e2b49afc8c4e598c841205b7fbbee61 /packages/monorepo-scripts/src/test_installation.ts
parent5eb90697c824f1c98467cdb6cd71dbb94ff70805 (diff)
parent72aa3d3005c81c1d0deb66369ce543bda3cccdc1 (diff)
downloaddexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar
dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.gz
dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.bz2
dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.lz
dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.xz
dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.zst
dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.zip
Merge pull request #520 from 0xProject/fix/installation-tests
Fix the publishing/installation test issues
Diffstat (limited to 'packages/monorepo-scripts/src/test_installation.ts')
-rw-r--r--packages/monorepo-scripts/src/test_installation.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts
index 195b64b2a..78e0f0929 100644
--- a/packages/monorepo-scripts/src/test_installation.ts
+++ b/packages/monorepo-scripts/src/test_installation.ts
@@ -31,7 +31,7 @@ import { utils } from './utils';
utils.log(`Installing ${packedPackageFileName}`);
result = await execAsync(`yarn add ${packagePath}/${packedPackageFileName}`, { cwd: testDirectory });
const indexFilePath = path.join(testDirectory, 'index.ts');
- fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}'`);
+ fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}';\n`);
const tsConfig = {
compilerOptions: {
typeRoots: ['node_modules/@0xproject/typescript-typings/types', 'node_modules/@types'],
@@ -48,11 +48,13 @@ import { utils } from './utils';
const tsconfigFilePath = path.join(testDirectory, 'tsconfig.json');
fs.writeFileSync(tsconfigFilePath, JSON.stringify(tsConfig, null, 4));
utils.log(`Compiling ${packageName}`);
- await execAsync('../node_modules/typescript/bin/tsc', { cwd: testDirectory });
+ const tscBinaryPath = path.join(monorepoRootPath, './node_modules/typescript/bin/tsc');
+ await execAsync(tscBinaryPath, { cwd: testDirectory });
utils.log(`Successfully compiled with ${packageName} as a dependency`);
rimraf.sync(testDirectory);
}
})().catch(err => {
+ utils.log(err.stderr);
utils.log(err.stdout);
process.exit(1);
});