-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6003742
commit 20437f3
Showing
7 changed files
with
33 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { createResolver, Options } from '@pssbletrngle/pack-resolver' | ||
import { createResolver, IResolver, Options } from '@pssbletrngle/pack-resolver' | ||
|
||
export default function createTestResolver(options: Partial<Options> = {}) { | ||
export default function createTestResolver(options: Partial<Options> = {}): IResolver { | ||
return createResolver({ from: 'test/resources', silent: true, ...options }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import createTestLogger from '../mock/TestLogger' | ||
import { PackLoader } from '../../src' | ||
import createTestResolver from '../mock/TestResolver' | ||
import { Options } from '@pssbletrngle/pack-resolver' | ||
|
||
export default function setupLoader(options?: Partial<Options>) { | ||
const logger = createTestLogger() | ||
const loader = new PackLoader(logger) | ||
|
||
beforeAll(async () => { | ||
const resolver = createTestResolver(options) | ||
await loader.loadFrom(resolver) | ||
}, 15_0000) | ||
|
||
afterEach(() => { | ||
loader.clear() | ||
logger.reset() | ||
}) | ||
|
||
return { loader, logger } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters