Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 3, 2025
1 parent 5a80a53 commit 625bbd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions test/loader/file_loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert';
import path from 'node:path';
import { isClass } from 'is-type-of';
import yaml from 'js-yaml';
import { FileLoader } from '../../src/loader/file_loader.js';
import { FileLoader, CaseStyle } from '../../src/loader/file_loader.js';
import { getFilepath } from '../helper.js';

const dirBase = getFilepath('load_dirs');
Expand Down Expand Up @@ -275,7 +275,7 @@ describe('test/loader/file_loader.test.ts', () => {
await new FileLoader({
directory: path.join(dirBase, 'camelize'),
target,
caseStyle: 'upper',
caseStyle: CaseStyle.upper,
}).load();

assert(target.FooBar1);
Expand All @@ -289,7 +289,7 @@ describe('test/loader/file_loader.test.ts', () => {
await new FileLoader({
directory: path.join(dirBase, 'camelize'),
target,
caseStyle: 'camel',
caseStyle: CaseStyle.camel,
}).load();

assert(target.fooBar1);
Expand All @@ -303,7 +303,7 @@ describe('test/loader/file_loader.test.ts', () => {
await new FileLoader({
directory: path.join(dirBase, 'camelize'),
target,
caseStyle: 'lower',
caseStyle: CaseStyle.lower,
}).load();

assert(target.fooBar1);
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('test/loader/file_loader.test.ts', () => {
await new FileLoader({
directory: path.join(dirBase, 'camelize'),
target,
caseStyle: 'upper',
caseStyle: CaseStyle.upper,
lowercaseFirst: true,
}).load();

Expand Down
6 changes: 3 additions & 3 deletions test/loader/mixin/load_custom_loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('test/loader/mixin/load_custom_loader.test.ts', () => {
custom: {
},
},
};
} as any;
await app.loader.loadCustomLoader();
throw new Error('should not run');
} catch (err: any) {
Expand All @@ -88,7 +88,7 @@ describe('test/loader/mixin/load_custom_loader.test.ts', () => {
inject: 'unknown',
},
},
};
} as any;
await app.loader.loadCustomLoader();
throw new Error('should not run');
} catch (err: any) {
Expand Down Expand Up @@ -127,7 +127,7 @@ describe('test/loader/mixin/load_custom_loader.test.ts', () => {
inject: 'ctx',
},
},
};
} as any;
await app.loader.loadCustomLoader();
throw new Error('should not run');
} catch (err: any) {
Expand Down

0 comments on commit 625bbd5

Please sign in to comment.