Skip to content

Commit

Permalink
fix test on node 4
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Feb 8, 2017
1 parent a7dd63c commit 80dcf1b
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 46 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-16 Lloyd Brookes <75pound@gmail.com>
Copyright (c) 2014-17 Lloyd Brookes <75pound@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -57,4 +57,4 @@ $ npm install -g jsdoc-to-markdown

* * *

&copy; 2014-16 Lloyd Brookes <75pound@gmail.com>.
&copy; 2014-17 Lloyd Brookes <75pound@gmail.com>.
10 changes: 0 additions & 10 deletions bin.js

This file was deleted.

11 changes: 0 additions & 11 deletions main.js

This file was deleted.

9 changes: 0 additions & 9 deletions test.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/async.js
Expand Up @@ -3,11 +3,6 @@ const TestRunner = require('test-runner')
const jsdoc2md = require('../')
const a = require('assert')
const fs = require('fs')
try {
fs.mkdirSync('tmp-test')
} catch (err) {
// exists
}
jsdoc2md._usage.disable()

const runner = new TestRunner()
Expand Down
8 changes: 4 additions & 4 deletions test/cli.js
Expand Up @@ -8,21 +8,21 @@ const runner = new TestRunner()
const inputPath = 'test/fixture/ignore.js'

try {
fs.mkdirSync('tmp')
fs.mkdirSync('tmp-test')
} catch (err) {
// dir exists
}

runner.test('cli: json option', function () {
const outputFile = fs.openSync('tmp/ignore.json', 'w')
const outputFile = fs.openSync('tmp-test/ignore.json', 'w')
return new Promise((resolve, reject) => {
const handle = spawn(
'node',
[ 'bin.js', '--no-usage-stats', '--no-cache', '--json', inputPath ],
[ 'bin/cli.js', '--no-usage-stats', '--no-cache', '--json', inputPath ],
{ stdio: [ 'ignore', outputFile, 'ignore' ] }
)
handle.on('close', function () {
const json = fs.readFileSync('tmp/ignore.json', 'utf8')
const json = fs.readFileSync('tmp-test/ignore.json', 'utf8')
if (json) {
a.ok(/"id": "visible"/.test(json.toString()))
resolve()
Expand Down
5 changes: 0 additions & 5 deletions test/sync.js
Expand Up @@ -4,11 +4,6 @@ const jsdoc2md = require('../')
const a = require('assert')
const fs = require('fs')

try {
fs.mkdirSync('tmp-test')
} catch (err) {
// exists
}
const runner = new TestRunner()
const inputFile = 'test/fixture/ignore.js'

Expand Down

0 comments on commit 80dcf1b

Please sign in to comment.