Skip to content

Commit

Permalink
test: update integration test with the new options
Browse files Browse the repository at this point in the history
  • Loading branch information
OrRosenblatt authored and antongolub committed Oct 26, 2024
1 parent 015a4b9 commit 3e76991
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/test/ts/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const noop = () => {
}
const fixtures = resolve(__dirname, '../fixtures/')
const registryUrl = 'https://example.com'
const dependency = 'example-package'
const scopedDependency = '@scope/package'
const strMatching = (start = '', end = '') =>
expect.stringMatching(new RegExp(`^${start}.+${end}$`))
const readFixture = (name: string): string =>
Expand Down Expand Up @@ -184,6 +186,10 @@ describe('yarn-audit-fix', () => {
'--verbose',
'--registry',
registryUrl,
'--exclude',
dependency,
'--exclude',
scopedDependency,
'--prefix',
expect.stringMatching(temp),
].filter((v) => v !== undefined),
Expand Down Expand Up @@ -241,7 +247,7 @@ describe('yarn-audit-fix', () => {
it('invokes cmd queue with proper args', async () => {
await run({
flow: 'patch',
temp
temp,
})

checkTempAssets()
Expand Down Expand Up @@ -282,6 +288,7 @@ describe('yarn-audit-fix', () => {
'package-lock-only': true,
registry: registryUrl,
flow: 'convert',
exclude: [dependency, scopedDependency],
ignoreEngines: true,
temp,
})
Expand Down Expand Up @@ -315,6 +322,8 @@ describe('yarn-audit-fix', () => {
'--package-lock-only=false',
`--registry=${registryUrl}`,
'--flow=convert',
`--exclude=${dependency}`,
`--exclude=${scopedDependency}`,
'--ignore-engines',
)
await reimport('../../main/ts/cli')
Expand Down

0 comments on commit 3e76991

Please sign in to comment.