Skip to content

Commit

Permalink
To folders
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed May 17, 2024
1 parent 95f21f4 commit 64fe8d8
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion tests/computed.test.ts → tests/Signal/computed.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Computed", () => {
it("should work", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/state.test.ts → tests/Signal/state.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Signal.State", () => {
it("should work", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../../src/wrapper.js";

describe("currentComputed", () => {
it("works", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../../src/wrapper.js";

describe("Untrack", () => {
it("works", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../../src/wrapper.js";

describe("watch and unwatch", () => {
it("handles multiple watchers well", () => {
Expand Down
8 changes: 4 additions & 4 deletions tests/watcher.test.ts → tests/Signal/subtle/watcher.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../../src/wrapper.js";

describe("Watcher", () => {
type Destructor = () => void;
Expand Down Expand Up @@ -61,7 +61,7 @@ describe("Watcher", () => {
output = stateSignal.get();
computedOutput = computedSignal.get();
calls++;
return () => {};
return () => { };
});

// The signal is now watched
Expand Down Expand Up @@ -142,7 +142,7 @@ describe("Watcher", () => {
// Adding any other effect after an unwatch should work as expected
const destructor2 = effect(() => {
output = stateSignal.get();
return () => {};
return () => { };
});

stateSignal.set(300);
Expand All @@ -152,7 +152,7 @@ describe("Watcher", () => {
it("provides `this` to notify as normal function", () => {
const mockGetPending = vi.fn();

const watcher = new Signal.subtle.Watcher(function () {
const watcher = new Signal.subtle.Watcher(function() {
this.getPending();
});
watcher.getPending = mockGetPending;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it, vi } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Custom equality", () => {
it("works for State", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/cycles.test.ts → tests/behaviors/cycles.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Cycles", () => {
it("detects trivial cycles", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Dynamic dependencies", () => {
function run(live) {
Expand Down
2 changes: 1 addition & 1 deletion tests/errors.test.ts → tests/behaviors/errors.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Errors", () => {
it("are cached by computed signals", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it, vi } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("liveness", () => {
it("only changes on first and last descendant", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Prohibited contexts", () => {
it("allows writes during computed", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/pruning.test.ts → tests/behaviors/pruning.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Pruning", () => {
it("only recalculates until things are equal", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Receivers", () => {
it("is this for computed", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { Signal } from "../src/wrapper.js";
import { Signal } from "../../src/wrapper.js";

describe("Expected class shape", () => {
it("should be on the prototype", () => {
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export default defineConfig({
fileName: "index"
}
}
});
});

0 comments on commit 64fe8d8

Please sign in to comment.