This repository has been archived by the owner on Feb 15, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kelly Selden
committed
Dec 31, 2015
1 parent
b5ca937
commit 07996dc
Showing
7 changed files
with
62 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
coverage | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ node_js: | |
- "4" | ||
- "0.12" | ||
- "0.11" | ||
- "0.10" | ||
- "iojs" | ||
|
||
cache: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
var expect = require('chai').expect; | ||
var test = require('../../lib/test'); | ||
var spawn = require('child_process').spawn; | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
|
||
describe('Array', function() { | ||
describe('#indexOf()', function() { | ||
it('should return -1 when the value is not present', function() { | ||
test(); | ||
expect([1,2,3].indexOf(5)).to.equal(-1); | ||
expect([1,2,3].indexOf(0)).to.equal(-1); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('to-csv', function() { | ||
it('should return -1 when the value is not present', function(done) { | ||
// process.chdir(__dirname); | ||
|
||
fs.mkdir('tmp', function(err) { | ||
expect(err).to.be.falsy; | ||
|
||
var ps = spawn(process.execPath, [ | ||
// path.resolve(__dirname, '../bin/cmd.js'), | ||
'to-csv', | ||
'test/fixtures/locales', | ||
'tmp/i18n.csv', | ||
]); | ||
|
||
var out = ''; | ||
var err = ''; | ||
ps.stdout.on('data', function(buffer) { out += buffer; }); | ||
ps.stderr.on('data', function(buffer) { err += buffer; }); | ||
|
||
ps.on('exit', function(code) { | ||
fs.readFile('tmp/i18n.csv', 'utf-8', function(err, actual) { | ||
expect(err).to.be.falsy; | ||
fs.readFile('test/fixtures/i18n.csv', 'utf-8', function(err, expected) { | ||
expect(err).to.be.falsy; | ||
expect(actual).to.equal(expected); | ||
done(); | ||
}); | ||
}); | ||
expect(err).to.be.falsy; | ||
expect(code).to.equal(0); | ||
}); | ||
}); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters