Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

fix: use absolute paths for tests in windows #41

Merged
merged 1 commit into from
Apr 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test/schemes/flat/error.test.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
'use strict';

const path = require('path');
const test = require('ava');

const walk = require('../../../lib/index');

test.cb('should throw error if level is not found', t => {
t.plan(2);

const levelpath = path.resolve('./not-existing-level');
const options = {
levels: {}
};

walk(['not-existing-level'], options)
walk([levelpath], options)
.resume()
.on('error', err => {
t.is(err.code, 'ENOENT');
t.is(err.path, 'not-existing-level');
t.is(err.path, levelpath);
t.end();
});
});
6 changes: 4 additions & 2 deletions test/schemes/nested/error.test.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
'use strict';

const path = require('path');
const test = require('ava');

const walk = require('../../../lib/index');

test.cb('should throw error if level is not found', t => {
t.plan(2);

const levelpath = path.resolve('./not-existing-level');
const options = {
levels: {}
};

walk(['not-existing-level'], options)
walk([levelpath], options)
.resume()
.on('error', err => {
t.is(err.code, 'ENOENT');
t.is(err.path, 'not-existing-level');
t.is(err.path, levelpath);
t.end();
});
});