Alias would remove unnecessary repetitions and less relative paths make changes easier when moving around files. This commit cleans also up some relative paths ('../../../') by using the alias and orders imports. It updates both path alias in tsconfig and module alias in Vue CLI's bundler (vuejs/vue-cli#2398).
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import 'mocha';
|
|
import { expect } from 'chai';
|
|
import { ILanguageSyntax } from '@/domain/ScriptCode';
|
|
import { BatchFileSyntax } from '@/application/Parser/Script/Syntax/BatchFileSyntax';
|
|
import { ShellScriptSyntax } from '@/application/Parser/Script/Syntax/ShellScriptSyntax';
|
|
|
|
function getSystemsUnderTest(): ILanguageSyntax[] {
|
|
return [ new BatchFileSyntax(), new ShellScriptSyntax() ];
|
|
}
|
|
|
|
describe('ConcreteSyntaxes', () => {
|
|
describe('commentDelimiters', () => {
|
|
for (const sut of getSystemsUnderTest()) {
|
|
it(`${sut.constructor.name} returns defined value`, () => {
|
|
// act
|
|
const value = sut.commentDelimiters;
|
|
// assert
|
|
expect(value);
|
|
});
|
|
}
|
|
});
|
|
describe('commonCodeParts', () => {
|
|
for (const sut of getSystemsUnderTest()) {
|
|
it(`${sut.constructor.name} returns defined value`, () => {
|
|
// act
|
|
const value = sut.commonCodeParts;
|
|
// assert
|
|
expect(value);
|
|
});
|
|
}
|
|
});
|
|
});
|