Skip to content

Commit

Permalink
tests cleanup: reenabled test, removed npm from CI commands (#1692)
Browse files Browse the repository at this point in the history
* enabled install-import-pr-2, this feature has been implemented

* a better test fix
  • Loading branch information
bestander authored and wyze committed Nov 4, 2016
1 parent f97c5b5 commit ea35fe9
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ os:
#- osx
- linux

script: npm run $TEST_TYPE
script: yarn $TEST_TYPE
6 changes: 3 additions & 3 deletions __tests__/commands/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ test.concurrent('add with new dependency should be deterministic', (): Promise<v
});
});

// TODO https://github.com/facebook/yarn/issues/79
xit('add with new dependency should be deterministic 2', (): Promise<void> => {
test.concurrent('add with new dependency should be deterministic 2', (): Promise<void> => {
// [email protected]>[email protected] is saved in local mirror and is deduped
// install [email protected] should replace [email protected] in root

Expand Down Expand Up @@ -275,7 +274,8 @@ xit('add with new dependency should be deterministic 2', (): Promise<void> => {

const lockFileWritten = await fs.readFile(path.join(config.cwd, 'yarn.lock'));
const lockFileLines = explodeLockfile(lockFileWritten);
assert.equal(lockFileLines.length, 8);
// see why we don't cleanup lockfile https://github.com/yarnpkg/yarn/issues/79
assert.equal(lockFileLines.length, 11);

const mirror = await fs.walk(path.join(config.cwd, mirrorPath));
assert.equal(mirror.length, 3);
Expand Down
4 changes: 2 additions & 2 deletions __tests__/commands/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ test.concurrent('install should respect --no-bin-links flag', (): Promise<void>
});


xit('install should update a dependency to yarn and mirror (PR import scenario 2)', (): Promise<void> => {
// [email protected] is saved in local mirror and gets updated to [email protected] via
test.concurrent('install should update a dependency to yarn and mirror (PR import scenario 2)', (): Promise<void> => {
// [email protected] is gets updated to [email protected] via
// a change in package.json,
// files in mirror, yarn.lock, package.json and node_modules should reflect that

Expand Down
Empty file modified __tests__/fixtures/install/install-import-pr-2/.npmrc
100755 → 100644
Empty file.
Binary file not shown.
Binary file not shown.
10 changes: 0 additions & 10 deletions __tests__/fixtures/install/install-import-pr-2/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion __tests__/fixtures/request-cache/GET/localhost/.bin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HTTP/1.1 200 OK
Date: Fri, 04 Nov 2016 14:55:49 GMT
Date: Fri, 04 Nov 2016 19:13:14 GMT
Connection: close
Content-Length: 2

Expand Down
8 changes: 4 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ test:
if [ "$CIRCLE_BRANCH" == 'master' ]; then
./scripts/set-dev-version.js
fi;
- npm run lint
- npm run test-ci
- npm run check-lockfile
- npm run build-dist
- yarn lint
- yarn test-ci
- yarn check-lockfile
- yarn build-dist
- node ./scripts/build-webpack.js
- ./scripts/build-deb.sh

Expand Down

0 comments on commit ea35fe9

Please sign in to comment.