Co-authored-by: Mikhail Bashkirov <mikhail.bashkirov@ing.com> Co-authored-by: Thijs Louisse <thijs.louisse@ing.com> Co-authored-by: Joren Broekema <joren.broekema@ing.com> Co-authored-by: Gerjan van Geest <gerjan.van.geest@ing.com> Co-authored-by: Erik Kroes <erik.kroes@ing.com> Co-authored-by: Lars den Bakker <lars.den.bakker@ing.com>
21 lines
814 B
JavaScript
21 lines
814 B
JavaScript
import { expect } from '@open-wc/testing';
|
|
import { Unparseable } from '../src/Unparseable.js';
|
|
|
|
describe('Unparseable', () => {
|
|
it(`can be instantiated`, async () => {
|
|
const instance = new Unparseable('my view value');
|
|
expect(instance instanceof Unparseable).to.equal(true);
|
|
});
|
|
it(`contains a viewValue`, async () => {
|
|
const instance = new Unparseable('my view value');
|
|
expect(instance.viewValue).to.equal('my view value');
|
|
});
|
|
it(`contains a type`, async () => {
|
|
const instance = new Unparseable('my view value');
|
|
expect(instance.type).to.equal('unparseable');
|
|
});
|
|
it(`is serialized as an object`, async () => {
|
|
const instance = new Unparseable('my view value');
|
|
expect(instance.toString()).to.equal('{"type":"unparseable","viewValue":"my view value"}');
|
|
});
|
|
});
|