Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Mar 29, 2024
1 parent 4ecd858 commit 4c02535
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'node:path'
import fs from 'node:fs/promises'
import { describe, expect, it, vi } from 'vitest'

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

0 comments on commit 4c02535

Please sign in to comment.