Files
privacy.sexy/tests/unit/shared/Stubs/ScriptingDefinitionDataStub.ts
undergroundwires 5bbbb9cecc Refactor to remove code coupling with Webpack
Remove using Webpack import syntax such as: `js-yaml-loader!@/..`. It's
a non-standard syntax that couples the code to Webpack.

Configure instead by specifying Webpack loader in Vue configuration
file.

Enable related ESLint rules.

Remove unused dependency `raw-loader` and refactor
`NoUnintendedInlining` test to load files using file system (dropping
webpack dependency).

Refactor to use `import type` for type imports to show the indent
clearly and satisfy failing ESLint rules.
2022-01-31 17:22:34 +01:00

33 lines
887 B
TypeScript

import type { ScriptingDefinitionData } from '@/application/collections/';
import { ScriptingLanguage } from '@/domain/ScriptingLanguage';
export class ScriptingDefinitionDataStub implements ScriptingDefinitionData {
public language = ScriptingLanguage[ScriptingLanguage.batchfile];
public fileExtension = 'bat';
public startCode = 'startCode';
public endCode = 'endCode';
public withLanguage(language: string): ScriptingDefinitionDataStub {
this.language = language;
return this;
}
public withStartCode(startCode: string): ScriptingDefinitionDataStub {
this.startCode = startCode;
return this;
}
public withEndCode(endCode: string): ScriptingDefinitionDataStub {
this.endCode = endCode;
return this;
}
public withExtension(extension: string): ScriptingDefinitionDataStub {
this.fileExtension = extension;
return this;
}
}