Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
20 lines
450 B
JavaScript
20 lines
450 B
JavaScript
'use strict';
|
|
/* XXX Can this test be modified to not call the now-removed wait()? */
|
|
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
|
|
console.log('first stat ...');
|
|
|
|
fs.stat(__filename)
|
|
.addCallback(function(stats) {
|
|
console.log('second stat ...');
|
|
fs.stat(__filename)
|
|
.timeout(1000)
|
|
.wait();
|
|
console.log('test passed');
|
|
})
|
|
.addErrback(function() {
|
|
throw new Exception();
|
|
});
|