Skip to content

Commit

Permalink
🧪 test(none): update setPath assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kellymears committed Dec 9, 2024
1 parent 5331907 commit 5b6410b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions sources/@roots/sage/test/sage/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,21 @@ describe(`@roots/sage`, async () => {
await bud.extensions.add(`@roots/sage`)

expect(bud.extensions.has(`@roots/sage/blade-loader`)).toBeTruthy()
expect(bud.extensions.get(`@roots/sage/blade-loader`).enabled).toBeTruthy()
expect(
bud.extensions.get(`@roots/sage/blade-loader`).enabled,
).toBeTruthy()
})


it(`sage.blade.enable`, async () => {
expect(bud.extensions.has(`@roots/sage/blade-loader`)).toBeFalsy()

await bud.extensions.add(`@roots/sage`)

bud.sage.blade.enable(false).done()

expect(bud.extensions.get(`@roots/sage/blade-loader`).enabled).toBeFalsy()
expect(
bud.extensions.get(`@roots/sage/blade-loader`).enabled,
).toBeFalsy()
})

it(`should register errything`, async () => {
Expand All @@ -82,10 +85,12 @@ describe(`@roots/sage`, async () => {

expect(setPathSpy).toHaveBeenCalledWith({
'@dist': `public`,
'@src': `resources`,
})
expect(setPathSpy).toHaveBeenCalledWith({
'@fonts': `@src/fonts`,
'@images': `@src/images`,
'@scripts': `@src/scripts`,
'@src': `resources`,
'@styles': `@src/styles`,
'@views': `@src/views`,
})
Expand All @@ -98,7 +103,7 @@ describe(`@roots/sage`, async () => {

expect(bud.hooks.filter(`build.output.uniqueName`)).toEqual(
// @ts-ignore
bud.sage.getUniqueName()
bud.sage.getUniqueName(),
)
})

Expand Down

0 comments on commit 5b6410b

Please sign in to comment.