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

Testing: Support defining options for fixture tests #492

Merged
merged 1 commit into from
Aug 22, 2016

Conversation

arv
Copy link
Contributor

@arv arv commented Aug 18, 2016

This reads the fixture file and looks for

// Options: <JSON>

which it uses as the options for documentation.build and
documentation.buildSync.

@@ -20,6 +20,18 @@ function makePOJO(ast) {
return JSON.parse(JSON.stringify(ast));
}

function readOptionsFromFile(file) {
var s = fs.readFileSync(file, 'utf-8');
var lines = s.split(/\n/, 20);
Copy link
Member

Choose a reason for hiding this comment

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

didn't know that String.prototype.split had a second param. Cool! Learned something today

@arv
Copy link
Contributor Author

arv commented Aug 18, 2016

Timed out. 120s is not enough on CircleCi 😢

@tmcw
Copy link
Member

tmcw commented Aug 18, 2016

I think there's actually a bug in the tap integration - according to the current docs, options is the second param, not the third. If true, this explains a lot of our issues with tests timing out. I've got a branch with this fixed, pushing it in a moment and hopefully that makes tests stabler.

This reads the fixture file and looks for

```js
// Options: <JSON>
```

which it uses as the options for documentation.build and
documentation.buildSync.
@arv
Copy link
Contributor Author

arv commented Aug 22, 2016

CircleCi now passes 🚀

@tmcw
Copy link
Member

tmcw commented Aug 22, 2016

💯 excellent, merging.

@tmcw tmcw merged commit 662c2f9 into documentationjs:master Aug 22, 2016
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.

2 participants