mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
test(packages/tuono): create-json-config test are not clearing writeFileSpy mock (#593)
This commit is contained in:
committed by
GitHub
parent
d679982949
commit
067535c2f6
@@ -1,6 +1,6 @@
|
||||
import fs from 'fs/promises'
|
||||
|
||||
import { describe, expect, it, vitest } from 'vitest'
|
||||
import { beforeEach, describe, expect, it, vitest } from 'vitest'
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
|
||||
import { createJsonConfig } from './create-json-config'
|
||||
@@ -8,6 +8,10 @@ import { createJsonConfig } from './create-json-config'
|
||||
const writeFileSpy = vitest.spyOn(fs, 'writeFile').mockResolvedValue(void 0)
|
||||
|
||||
describe('createJsonConfig', () => {
|
||||
beforeEach(() => {
|
||||
writeFileSpy.mockClear()
|
||||
})
|
||||
|
||||
const sampleConfig = { server: { host: 'h', port: 1 } }
|
||||
|
||||
it('should process config with only server property', async () => {
|
||||
|
||||
Reference in New Issue
Block a user