Skip to content

Commit

Permalink
chore: release 0.5.4 (#129)
Browse files Browse the repository at this point in the history
* chore: release 0.5.4

This release includes a fix for
#128.

* fix a test
  • Loading branch information
jinwoo committed Mar 2, 2018
1 parent 6bd7a38 commit 9fd094b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gts",
"version": "0.5.3",
"version": "0.5.4",
"description": "Google TypeScript Style",
"repository": "google/ts-style",
"main": "build/src/index.js",
Expand Down
14 changes: 11 additions & 3 deletions test/test-kitchen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,25 @@ test.serial('use as a non-locally installed module', async t => {
// simulates use as a globally installed module.
const GTS = `${stagingPath}/kitchen/node_modules/.bin/gts`;
const tmpDir = tmp.dirSync({keep, unsafeCleanup: true});
const opts = {cwd: `${tmpDir.name}/kitchen`};

// Copy test files.
await ncpp('test/fixtures', `${tmpDir.name}/`);
// Test package.json expects a gts tarball from ../gts.tgz.
await ncpp(`${stagingPath}/gts.tgz`, `${tmpDir.name}/gts.tgz`);
// It's important to use `-n` here because we don't want to overwrite
// the version of gts installed, as it will trigger the npm install.
await simpleExecp(`${GTS} init -n`, opts);

const opts = {cwd: `${tmpDir.name}/kitchen`};
await simpleExecp(`${GTS} init -y`, opts);
// The `extends` field must use the local gts path.
const tsconfigJson =
fs.readFileSync(`${tmpDir.name}/kitchen/tsconfig.json`, 'utf8');
const tsconfig = JSON.parse(tsconfigJson);
t.deepEqual(tsconfig.extends, './node_modules/gts/tsconfig-google.json');

await simpleExecp(`${GTS} check kitchen/src/server.ts`, opts);
// server.ts has a lint error. Should error.
await t.throws(simpleExecp(`${GTS} check src/server.ts`, opts));

if (!keep) {
tmpDir.removeCallback();
}
Expand Down

0 comments on commit 9fd094b

Please sign in to comment.