Make Vitest helpers global

This commit is contained in:
Steve Kinney
2024-10-01 16:49:45 -05:00
parent 45f8282a05
commit 7f6b9ad691
19 changed files with 48 additions and 32 deletions

View File

@@ -1,4 +1,3 @@
import { it, expect, describe } from 'vitest';
import { createButton } from './button.js';
describe('createButton', () => {

View File

@@ -1,5 +1,3 @@
import { it, expect } from 'vitest';
it('should properly assign to localStorage', () => {
const key = 'secret';
const message = "It's a secret to everybody.";

View File

@@ -1,4 +1,3 @@
import { describe, expect, it, beforeEach, vi, afterEach } from 'vitest';
import { screen } from '@testing-library/dom';
import userEvent from '@testing-library/user-event';
import { createSecretInput } from './secret-input.js';

View File

@@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
},
});