simplified finding duplicates

This commit is contained in:
undergroundwires
2020-01-06 18:19:28 +01:00
parent c359f1d89c
commit 57037aaefc
2 changed files with 21 additions and 15 deletions

View File

@@ -0,0 +1,17 @@
import 'mocha';
import { expect } from 'chai';
import { Script } from '@/domain/Script';
describe('Script', () => {
it('cannot construct with duplicate lines', async () => {
// arrange
const code = 'duplicate\nduplicate\ntest\nduplicate';
// act
function construct() { return new Script('ScriptName', code, []); }
// assert
expect(construct).to.throw();
});
});