loader.io.api
Version:
loader.io api wrapper for nodejs. If you interested in this npm package, take a look at the npm package [perst](https://dasred.github.io/perst).
21 lines (16 loc) • 580 B
JavaScript
import Exception from '../Exception.js';
describe('Exception', () => {
describe('.constructor()', () => {
test('with values', () => {
const data = {nuff: 'rofl'};
const exception = new Exception('narf', data);
expect(exception.message).toBe('narf');
expect(exception.data).toBe(data);
});
test('with defaults', () => {
const exception = new Exception('narf');
expect(exception.message).toBe('narf');
expect(exception.data).toBeUndefined();
});
});
});