BREAKING(structure): modernize internal structure and support unpacking
This commit is contained in:
16
test/test.ts
16
test/test.ts
@@ -1,19 +1,21 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
|
||||
import * as tsbuild from '../ts/index.js';
|
||||
import { TsCompiler } from '../ts/index.js';
|
||||
|
||||
let assetfiles: string[] = ['./test/assets/tocompile.ts', './test/assets/tocompile2.ts'];
|
||||
const assetfiles: string[] = ['./test/assets/tocompile.ts', './test/assets/tocompile2.ts'];
|
||||
|
||||
let assetfiles2 = {
|
||||
const assetfiles2 = {
|
||||
'./test/assets/**/!(*.d.ts|*.js|output)': './test/assets/output',
|
||||
};
|
||||
|
||||
tap.test('should convert files from an array with single files to output', async (tools) => {
|
||||
tsbuild.compileFileArray(assetfiles, { outDir: './test/assets/output' });
|
||||
tap.test('should compile files from an array', async () => {
|
||||
const compiler = new TsCompiler();
|
||||
await compiler.compileFilesOrThrow(assetfiles, { outDir: './test/assets/output' });
|
||||
});
|
||||
|
||||
tap.test('should convert files from an array with single files to output', async (tools) => {
|
||||
tsbuild.compileGlobStringObject(assetfiles2);
|
||||
tap.test('should compile files from glob pattern object', async () => {
|
||||
const compiler = new TsCompiler();
|
||||
await compiler.compileGlob(assetfiles2);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
||||
Reference in New Issue
Block a user