Skip to content

Commit 75fc5f3

Browse files
authored
Set up vitest workspaces, re-enable ssr test (adazzle#3592)
1 parent 25d0617 commit 75fc5f3

34 files changed

+107
-88
lines changed

test/TextEditor.test.tsx renamed to test/browser/TextEditor.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { useState } from 'react';
22
import { fireEvent, render, screen } from '@testing-library/react';
33
import userEvent from '@testing-library/user-event';
44

5-
import DataGrid, { textEditor } from '../src';
6-
import type { Column } from '../src';
5+
import DataGrid, { textEditor } from '../../src';
6+
import type { Column } from '../../src';
77
import { getCells } from './utils';
88

99
interface Row {

test/TreeDataGrid.test.tsx renamed to test/browser/TreeDataGrid.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { useState } from 'react';
22
import { render, screen, within } from '@testing-library/react';
33
import userEvent from '@testing-library/user-event';
44

5-
import type { Column } from '../src';
6-
import { SelectColumn, textEditor, TreeDataGrid } from '../src';
7-
import { focusSinkClassname } from '../src/style/core';
8-
import { rowSelected } from '../src/style/row';
9-
import type { PasteEvent } from '../src/types';
5+
import type { Column } from '../../src';
6+
import { SelectColumn, textEditor, TreeDataGrid } from '../../src';
7+
import { focusSinkClassname } from '../../src/style/core';
8+
import { rowSelected } from '../../src/style/row';
9+
import type { PasteEvent } from '../../src/types';
1010
import {
1111
copySelectedCell,
1212
getCellsAtRowIndex,

test/column/cellClass.test.ts renamed to test/browser/column/cellClass.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Column } from '../../src';
2-
import { cellClassname } from '../../src/style/cell';
1+
import type { Column } from '../../../src';
2+
import { cellClassname } from '../../../src/style/cell';
33
import { getCells, setup } from '../utils';
44

55
interface Row {

test/column/colSpan.test.ts renamed to test/browser/column/colSpan.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import userEvent from '@testing-library/user-event';
22

3-
import type { Column } from '../../src';
3+
import type { Column } from '../../../src';
44
import { getCellsAtRowIndex, getHeaderCells, setup, validateCellPosition } from '../utils';
55

66
describe('colSpan', () => {

test/column/draggable.test.ts renamed to test/browser/column/draggable.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { act } from 'react';
22
import { userEvent } from '@vitest/browser/context';
33

4-
import type { Column } from '../../src';
4+
import type { Column } from '../../../src';
55
import { getHeaderCells, setup } from '../utils';
66

77
const columns: readonly Column<never>[] = [

test/column/frozen.test.ts renamed to test/browser/column/frozen.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Column } from '../../src';
2-
import { cellClassname, cellFrozenClassname } from '../../src/style/cell';
1+
import type { Column } from '../../../src';
2+
import { cellClassname, cellFrozenClassname } from '../../../src/style/cell';
33
import { getHeaderCells, setup } from '../utils';
44

55
test('frozen column have a specific class, and are stable-sorted before non-frozen columns', () => {

test/column/grouping.test.ts renamed to test/browser/column/grouping.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { screen, within } from '@testing-library/react';
22
import userEvent from '@testing-library/user-event';
33

4-
import type { ColumnOrColumnGroup } from '../../src';
4+
import type { ColumnOrColumnGroup } from '../../../src';
55
import { getSelectedCell, setup, validateCellPosition } from '../utils';
66

77
const columns: readonly ColumnOrColumnGroup<NonNullable<unknown>>[] = [

test/column/headerCellClass.test.ts renamed to test/browser/column/headerCellClass.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Column, ColumnGroup } from '../../src';
2-
import { cellClassname } from '../../src/style/cell';
1+
import type { Column, ColumnGroup } from '../../../src';
2+
import { cellClassname } from '../../../src/style/cell';
33
import { getHeaderCells, setup } from '../utils';
44

55
test('headerCellClass is either nullish or a string', () => {

test/column/key.test.ts renamed to test/browser/column/key.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Column } from '../../src';
1+
import type { Column } from '../../../src';
22
import { setup } from '../utils';
33

44
test('key is escaped in query selectors', () => {

test/column/name.test.tsx renamed to test/browser/column/name.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Column } from '../../src';
1+
import type { Column } from '../../../src';
22
import { getHeaderCells, setup } from '../utils';
33

44
test('name is either a string or an element', () => {

0 commit comments

Comments
 (0)