mirror of
https://github.com/falk-werner/webfuse-js
synced 2024-10-27 20:44:08 +00:00
20 lines
555 B
JavaScript
20 lines
555 B
JavaScript
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);
|
|
}
|
|
);
|
|
});
|
|
|
|
}); |