Skip to content

Commit

Permalink
Update unittest.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Apr 29, 2024
1 parent 56fff42 commit c1f8d97
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions test/build-engine/engine-js.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildEngine, BuildEngineResult } from '@ccbuild/build-engine';
import { buildEngine, BuildEngineResult, enumerateAllDependents, enumerateDependentAssets, enumerateDependentChunks } from '@ccbuild/build-engine';
import * as ps from 'path';
import * as fs from 'fs-extra';
import del from 'del';
Expand Down Expand Up @@ -137,9 +137,9 @@ describe('engine-js', () => {
split: true,
});

expect(buildEngine.enumerateAllDependents(res, features)).toMatchSnapshot();
expect(buildEngine.enumerateDependentChunks(res, features)).toMatchSnapshot();
expect(buildEngine.enumerateDependentAssets(res, features)).toMatchSnapshot();
expect(enumerateAllDependents(res, features)).toMatchSnapshot();
expect(enumerateDependentChunks(res, features)).toMatchSnapshot();
expect(enumerateDependentAssets(res, features)).toMatchSnapshot();
await del(out, { force: true });
});

Expand Down
4 changes: 2 additions & 2 deletions test/matrix-options.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { buildEngine } from '@ccbuild/build-engine';
import { buildEngine, BuildEngineOptions } from '@ccbuild/build-engine';
import { genOptionsFromMatrix } from './matrix-options';

test('matrix options', async () => {
const optionList = genOptionsFromMatrix<buildEngine.Options>({
const optionList = genOptionsFromMatrix<BuildEngineOptions>({
engine: ['./test-engine-source', './test-engine-source-without-symlink'],
out: ['./lib-matrix-options'],
platform: ['ALIPAY', 'OPEN_HARMONY', 'HTML5'],
Expand Down
2 changes: 1 addition & 1 deletion test/matrix-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface OptionData<T> {
* The matrix option can help us list all combinations to avoid missing test cases.
*
* @example
* const multipleBuildOptions = genOptionsFromMatrix<buildEngine.Options>({
* const multipleBuildOptions = genOptionsFromMatrix<BuildEngineOptions>({
* engine: ['./test-engine-source', './test-engine-source-without-symlink'],
* platform: ['ALIPAY', 'OPEN_HARMONY', 'HTML5'],
* });
Expand Down

0 comments on commit c1f8d97

Please sign in to comment.