From 7481c13043438e1e68855bdb77212817158bd25e Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Fri, 21 Jul 2023 17:07:49 -0300 Subject: [PATCH] test: unnecessary --- test/disable.test.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 test/disable.test.ts diff --git a/test/disable.test.ts b/test/disable.test.ts deleted file mode 100644 index 2c43dc7..0000000 --- a/test/disable.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { describe, test, expect, vi, afterAll } from 'vitest' -import { setup } from '@nuxt/test-utils' - -describe('disable', async () => { - const spyStderr = vi.spyOn(process.stderr, 'write').mockImplementation(() => undefined!) - - afterAll(() => { - spyStderr.mockRestore() - }) - - await setup({ - nuxtConfig: { - app: { - // @ts-ignore - head: () => {} - }, - googleFonts: { - families: { - Roboto: true - } - } - } - }) - - test('should warn if head as function', () => { - expect(spyStderr).toBeCalledTimes(1) - const output = spyStderr.mock.calls[0][0].toString() - expect(output).contains('[warn] [nuxt:google-fonts] This module does not work with `head` as function.') - }) -})