Complete the code to import the function needed to define a test in Vitest.
import { [1] } from 'vitest';
The test function is used to define a unit test in Vitest.
Complete the code to import the assertion function to check values in Vitest.
import { [1] } from 'vitest';
The expect function is used to write assertions in Vitest tests.
Fix the error in the Vitest test function declaration.
test('adds numbers', () => { const sum = 1 + 2; [1](sum).toBe(3); });
expect.The assertion function expect is used to check the test result.
Fill both blanks to create a Vitest test suite with a test case.
import { [1], [2] } from 'vitest'; describe('math tests', () => { test('multiply', () => { const result = 2 * 3; expect(result).toBe(6); }); });
describe groups tests, and test defines a test case in Vitest.
Fill all three blanks to write a Vitest test that checks if a Vue component renders text.
import { [1], [2] } from 'vitest'; import { shallowMount } from '@vue/test-utils'; import HelloWorld from './HelloWorld.vue'; test('renders greeting', () => { const wrapper = shallowMount(HelloWorld); [3](wrapper.text()).toContain('Hello'); });
test defines the test, expect asserts the output. shallowMount is imported separately.
