Skip to content

Commit

Permalink
refactor: move tests to test folder
Browse files Browse the repository at this point in the history
  • Loading branch information
divdavem committed Feb 28, 2025
1 parent 56cdb73 commit 0e76863
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"tdd:ui": "vitest --ui",
"benchmark": "vitest bench --run",
"clean": "rm -rf dist temp",
"lint": "eslint {src,benchmarks}/{,**/}*.ts",
"lint": "eslint {src,test,benchmarks}/{,**/}*.ts",
"build:rollup": "rollup --failAfterWarnings -c",
"build:dts": "tsc -p tsconfig.d.json",
"build": "npm run clean && npm run build:rollup && npm run build:dts",
Expand Down
12 changes: 6 additions & 6 deletions src/index.spec.ts → test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
StoresInputValues,
SubscribableStore,
SubscriberObject,
} from './index';
} from '../src/index';
import {
DerivedStore,
Store,
Expand All @@ -29,11 +29,11 @@ import {
symbolObservable,
untrack,
writable,
} from './index';
import { rawStoreSymbol } from './internal/exposeRawStores';
import { RawStoreFlags } from './internal/store';
import { flushUnused } from './internal/storeTrackingUsage';
import type { RawStoreWritable } from './internal/storeWritable';
} from '../src/index';
import { rawStoreSymbol } from '../src/internal/exposeRawStores';
import { RawStoreFlags } from '../src/internal/store';
import { flushUnused } from '../src/internal/storeTrackingUsage';
import type { RawStoreWritable } from '../src/internal/storeWritable';

const expectCorrectlyCleanedUp = <T>(store: StoreInput<T>) => {
const rawStore = (store as any)[rawStoreSymbol] as RawStoreWritable<T>;
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ process.env.NODE_OPTIONS = `${process.env.NODE_OPTIONS ?? ''} --expose-gc`;
export default defineConfig({
test: {
setupFiles: ['test.ts'],
include: ['src/**/*.spec.ts'],
include: ['test/**/*.spec.ts'],
environment: 'happy-dom',
coverage: {
provider: 'v8',
Expand Down

0 comments on commit 0e76863

Please sign in to comment.