Skip to content

Commit 4c02535

Browse files
fix unit test
1 parent 4ecd858 commit 4c02535

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/utils.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import path from 'node:path'
12
import fs from 'node:fs/promises'
23
import { describe, expect, it, vi } from 'vitest'
34

@@ -81,7 +82,7 @@ describe('createStencilConfigFile', () => {
8182
it('should create a config file', async () => {
8283
const options = { rootPath: '/test' }
8384
const configPath = await createStencilConfigFile(options)
84-
expect(configPath).toBe('/test/.stencil/test.stencil.config.ts')
85+
expect(configPath).toBe(path.resolve('test', '.stencil', 'test.stencil.config.ts'))
8586
expect(fs.mkdir).toHaveBeenCalledWith('/test/.stencil', { recursive: true })
8687
expect(fs.writeFile).toHaveBeenCalledWith(configPath, [
8788
'import type { Config } from \'@stencil/core\'\n',

0 commit comments

Comments
 (0)