Skip to content

Commit

Permalink
test: remove optional importer param
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jan 8, 2024
1 parent 05d56dd commit 2f53731
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 51 deletions.
2 changes: 1 addition & 1 deletion tests/ace/kernel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ test.group('Kernel', () => {
execMock.verify()
})

test('load commands from a package', async ({ assert }) => {
test('load commands from a module identifier', async ({ assert }) => {
const ignitor = new IgnitorFactory()
.withCoreConfig()
.merge({
Expand Down
18 changes: 3 additions & 15 deletions tests/providers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,7 @@ test.group('Providers', () => {
},
})
.withCoreConfig()
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, new URL('../', import.meta.url)).href)
},
})
.create(BASE_URL)

const app = ignitor.createApp('web')
await app.init()
Expand All @@ -136,11 +132,7 @@ test.group('Providers', () => {
},
})
.withCoreConfig()
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, new URL('../', import.meta.url)).href)
},
})
.create(BASE_URL)

const app = ignitor.createApp('web')
await app.init()
Expand All @@ -165,11 +157,7 @@ test.group('Providers', () => {
},
})
.withCoreConfig()
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, new URL('../', import.meta.url)).href)
},
})
.create(BASE_URL)

const app = ignitor.createApp('web')
await app.init()
Expand Down
42 changes: 7 additions & 35 deletions tests/request_validator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ test.group('Request validator', () => {
],
},
})
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, BASE_URL).href)
},
})
.create(BASE_URL)

const testUtils = new TestUtilsFactory().create(ignitor)
await testUtils.app.init()
Expand Down Expand Up @@ -75,11 +71,7 @@ test.group('Request validator', () => {
],
},
})
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, BASE_URL).href)
},
})
.create(BASE_URL)

const testUtils = new TestUtilsFactory().create(ignitor)
await testUtils.app.init()
Expand Down Expand Up @@ -112,11 +104,7 @@ test.group('Request validator', () => {
],
},
})
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, BASE_URL).href)
},
})
.create(BASE_URL)

const testUtils = new TestUtilsFactory().create(ignitor)
await testUtils.app.init()
Expand Down Expand Up @@ -148,11 +136,7 @@ test.group('Request validator', () => {
],
},
})
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, BASE_URL).href)
},
})
.create(BASE_URL)

const testUtils = new TestUtilsFactory().create(ignitor)
await testUtils.app.init()
Expand Down Expand Up @@ -191,11 +175,7 @@ test.group('Request validator', () => {
],
},
})
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, BASE_URL).href)
},
})
.create(BASE_URL)

const testUtils = new TestUtilsFactory().create(ignitor)
await testUtils.app.init()
Expand Down Expand Up @@ -242,11 +222,7 @@ test.group('Request validator', () => {
],
},
})
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, BASE_URL).href)
},
})
.create(BASE_URL)

const testUtils = new TestUtilsFactory().create(ignitor)
await testUtils.app.init()
Expand Down Expand Up @@ -298,11 +274,7 @@ test.group('Request validator', () => {
],
},
})
.create(BASE_URL, {
importer: (filePath) => {
return import(new URL(filePath, BASE_URL).href)
},
})
.create(BASE_URL)

const testUtils = new TestUtilsFactory().create(ignitor)
await testUtils.app.init()
Expand Down

0 comments on commit 2f53731

Please sign in to comment.