Skip to content

Commit

Permalink
Switch to vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
PuruVJ committed Jul 1, 2024
1 parent 0809b76 commit 68ac12d
Show file tree
Hide file tree
Showing 8 changed files with 505 additions and 2,118 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
tests
jest.config.js
.envrc
node_modules
9 changes: 0 additions & 9 deletions examples/quickstart/client/src/App.test.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions jest.config.js

This file was deleted.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"scripts": {
"build": "tsup",
"test": "jest",
"test": "vitest run",
"format": "prettier --write .",
"lint": "prettier . --check"
},
Expand All @@ -36,19 +36,17 @@
},
"devDependencies": {
"@types/brotli": "1.3.3",
"@types/jest": "^29.4.0",
"@types/node": "^18.14.6",
"@types/websocket": "^1.0.5",
"jest": "^29.5.0",
"lint-staged": ">=10",
"prettier": "3.3.2",
"prettier-eslint": "^15.0.1",
"pretty-quick": "^3.1.3",
"terser": "^5.31.1",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tsup": "^8.1.0",
"typescript": "^5.5.2"
"typescript": "^5.5.2",
"vitest": "^1.6.0"
},
"dependencies": {
"brotli": "1.3.3",
Expand Down
2,560 changes: 481 additions & 2,079 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions tests/algebraic_value.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { describe, expect, test } from "vitest";
import { AlgebraicType, BuiltinType } from "../src/algebraic_type";
import {
AlgebraicType,
ProductType,
ProductTypeElement,
BuiltinType,
} from "../src/algebraic_type";
import {
ProductValue,
AlgebraicValue,
SumValue,
BuiltinValue,
BinaryAdapter,
BuiltinValue,
ProductValue,
SumValue,
} from "../src/algebraic_value";
import BinaryReader from "../src/binary_reader";

Expand Down
22 changes: 13 additions & 9 deletions tests/spacetimedb_client.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import { SpacetimeDBClient, ReducerEvent } from "../src/spacetimedb";
import { BinarySerializer } from "../src/serializer";
import { Identity } from "../src/identity";
import { beforeEach, describe, expect, test } from "vitest";
import { Address } from "../src/address";
import { AlgebraicType, BuiltinType } from "../src/algebraic_type";
import { parseValue } from "../src/algebraic_value";
import * as ws from "../src/client_api";
import { ClientDB } from "../src/client_db";
import { Identity } from "../src/identity";
import { BinarySerializer } from "../src/serializer";
import {
__SPACETIMEDB__,
ReducerEvent,
SpacetimeDBClient,
} from "../src/spacetimedb";
import WebsocketTestAdapter from "../src/websocket_test_adapter";
import CreatePlayerReducer from "./types/create_player_reducer";
import Player from "./types/player";
import User from "./types/user";
import Point from "./types/point";
import CreatePlayerReducer from "./types/create_player_reducer";
import * as ws from "../src/client_api";
import { parseValue } from "../src/algebraic_value";
import { __SPACETIMEDB__ } from "../src/spacetimedb";
import { ClientDB } from "../src/client_db";
import User from "./types/user";

SpacetimeDBClient.registerTables(Player, User);
SpacetimeDBClient.registerReducers(CreatePlayerReducer);
Expand Down
3 changes: 3 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineConfig } from "vitest/config";

export default defineConfig({});

0 comments on commit 68ac12d

Please sign in to comment.