Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should be safe to call multiple times', () => {
const widget = new CSVViewer({ context });
expect(widget.isDisposed).to.equal(false);
widget.dispose();
widget.dispose();
expect(widget.isDisposed).to.equal(true);
});
});
it('should be the context for the file', () => {
const widget = new CSVViewer({ context });
expect(widget.context).to.equal(context);
});
});
it('should be the context for the file', () => {
const widget = new CSVViewer({ context });
expect(widget.context).to.equal(context);
});
});
it('should instantiate a `CSVViewer`', () => {
const widget = new CSVViewer({ context });
expect(widget).to.be.an.instanceof(CSVViewer);
widget.dispose();
});
});
it('should dispose of the resources held by the widget', () => {
const widget = new CSVViewer({ context });
expect(widget.isDisposed).to.equal(false);
widget.dispose();
expect(widget.isDisposed).to.equal(true);
});
it('should instantiate a `CSVViewer`', () => {
const widget = new CSVViewer({ context });
expect(widget).to.be.an.instanceof(CSVViewer);
widget.dispose();
});
});