Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo broken shareable configs #83

Merged
merged 1 commit into from
Mar 3, 2016
Merged

Demo broken shareable configs #83

merged 1 commit into from
Mar 3, 2016

Conversation

vadimdemedes
Copy link

PR to demonstrate #71 (comment). The test project is in test/fixtures/project.

@sindresorhus
Copy link
Member

Cool. Thanks for doing this. Could you make it something I could merge? So that tests can just fail until it's fixed.

@vadimdemedes
Copy link
Author

You mean to .skip() the failing test?

@@ -94,5 +94,8 @@
"ignores": [
"cli.js"
]
},
"ava": {
"files": "test/cli.js"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, remove this.

@vadimdemedes
Copy link
Author

Done!

@@ -31,3 +31,9 @@ test.skip('ignores fixture', async t => {
const cwd = path.join(__dirname, 'fixtures/ignores');
t.throws(execa('../../../cli.js', ['--no-local'], {cwd}));
});

test('supports shareable config', async () => {
await execa('rm', ['-rf', '../node_modules/xo'], {cwd: __dirname});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, didn't notice this. Why is this needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, I guess this is another, separate issue. https://github.com/sindresorhus/xo/blob/master/package.json#L91 causes cli.js to stop execution and rely on node_modules/xo rather than version in master branch. So when you're testing cli.js, you are not actually testing it, because it spawns cli.js from node_modules/xo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that's what the --no-local flag is supposed to prevent, though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok, I'll change it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ;) Totally my overshit oversight.

sindresorhus added a commit that referenced this pull request Mar 3, 2016
@sindresorhus sindresorhus merged commit 133642e into master Mar 3, 2016
@sindresorhus sindresorhus deleted the broken-configs branch March 3, 2016 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants