1
0
mirror of https://github.com/falk-werner/webfuse-js synced 2024-10-27 20:44:08 +00:00
falk-werner_webfuse-js/test/test_provider.js

20 lines
555 B
JavaScript
Raw Normal View History

2020-04-10 18:34:00 +00:00
const webfuse = require('../dist/webfuse')
const chai = require('chai');
const assert = chai.assert;
describe('Provider', function() {
it('lookup should throw not implemented error', function() {
const provider = new webfuse.Provider();
return provider.lookup(1, 'root').then(
() => Promise.reject(new Error("reject expected")),
err => {
assert.instanceOf(err, webfuse.BadState);
assert.equal(webfuse.BadState.NOT_IMPLEMENTED, err.code);
}
);
});
});