Skip to content

Commit

Permalink
Merge branch 'master' into can-nest-roots-version-check
Browse files Browse the repository at this point in the history
  • Loading branch information
ginomiglio authored Jul 12, 2022
2 parents c0d17f9 + 946dd6d commit 50dc496
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions test/index_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ describe('WatchDetector', function() {
expect(option.watchmanInfo).to.have.property('canNestRoots');
expect(option.watchmanInfo).to.have.property('enabled', true);
expect(ui.output).not.to.match(/fell back to: "node"/);
expect(ui.output).not.to.match(/Visit https:\/\/ember-cli.com\/user-guide\/#watchman/);
expect(ui.output).not.to.match(
/Visit https:\/\/cli.emberjs.com\/release\/basic-use\/#whyiswatchmanneeded/
);
});

describe('watchman does not work', function() {
Expand All @@ -105,7 +107,9 @@ describe('WatchDetector', function() {
expect(option.watchmanInfo).to.have.property('version');
expect(option.watchmanInfo).to.have.property('canNestRoots');
expect(ui.output).to.match(/fell back to: "node"/);
expect(ui.output).to.match(/Visit https:\/\/ember-cli.com\/user-guide\/#watchman/);
expect(ui.output).to.match(
/Visit https:\/\/cli.emberjs.com\/release\/basic-use\/#whyiswatchmanneeded/
);
});

it('falls back to polling if node does not work', function() {
Expand All @@ -119,7 +123,9 @@ describe('WatchDetector', function() {
expect(option.watchmanInfo).to.have.property('version');
expect(option.watchmanInfo).to.have.property('canNestRoots');
expect(ui.output).to.match(/fell back to: "polling"/);
expect(ui.output).to.match(/Visit https:\/\/ember-cli.com\/user-guide\/#watchman/);
expect(ui.output).to.match(
/Visit https:\/\/cli.emberjs.com\/release\/basic-use\/#whyiswatchmanneeded/
);
});
});
});
Expand Down Expand Up @@ -180,7 +186,9 @@ describe('WatchDetector', function() {
let preference = subject.checkWatchman();
expect(preference).to.have.property('watcher', 'watchman');
expect(ui.output).to.not.match(/falling back to NodeWatcher/);
expect(ui.output).to.not.match(/ember-cli\.com\/user-guide\/#watchman/);
expect(ui.output).to.not.match(
/Visit https:\/\/cli.emberjs.com\/release\/basic-use\/#whyiswatchmanneeded/
);
expect(ui.output).to.not.match(/Looks like you have a different program called watchman/);
expect(ui.output).to.not.match(/Invalid watchman found/);
});
Expand All @@ -195,7 +203,9 @@ describe('WatchDetector', function() {

let preference = subject.checkWatchman();
expect(preference).to.have.property('watcher', 'node');
expect(ui.output).to.not.match(/ember-cli\.com\/user-guide\/#watchman/);
expect(ui.output).to.not.match(
/Visit https:\/\/cli.emberjs.com\/release\/basic-use\/#whyiswatchmanneeded/
);
});

iff("the `watchman version` doesn't parse", function() {
Expand All @@ -206,7 +216,9 @@ describe('WatchDetector', function() {
let preference = subject.checkWatchman();
expect(preference).to.have.property('watcher', 'node');
expect(ui.output).to.match(/Looks like you have a different program called watchman/);
expect(ui.output).to.match(/ember-cli\.com\/user-guide\/#watchman/);
expect(ui.output).to.match(
/Visit https:\/\/cli.emberjs.com\/release\/basic-use\/#whyiswatchmanneeded/
);
});
});
});
Expand Down

0 comments on commit 50dc496

Please sign in to comment.