mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
refactor: move test directories
This commit is contained in:
parent
0d1e85754a
commit
10521d05c2
35 changed files with 81 additions and 77 deletions
|
|
@ -1,6 +1,6 @@
|
|||
local fs = require("@std/fs")
|
||||
local process = require("@lute/process")
|
||||
|
||||
fs.createdirectory("build")
|
||||
fs.createdirectory("build", { makeparents = true })
|
||||
|
||||
process.run({ "rojo", "build", "--output=build/charm.rbxm" }, { stdio = "inherit" })
|
||||
process.run({ "rojo", "build", "--output=build/charm.rbxm", "build.project.json" }, { stdio = "inherit" })
|
||||
|
|
|
|||
|
|
@ -19,16 +19,19 @@
|
|||
},
|
||||
"charm": {
|
||||
"$className": "Folder",
|
||||
"src": { "$path": "packages/charm/src" }
|
||||
"src": { "$path": "packages/charm/src" },
|
||||
"__tests__": { "$path": "packages/charm/__tests__" }
|
||||
},
|
||||
"charm-sync": {
|
||||
"$className": "Folder",
|
||||
"src": { "$path": "packages/charm-sync/src" },
|
||||
"__tests__": { "$path": "packages/charm-sync/__tests__" },
|
||||
"Charm": { "$path": "packages/charm-sync/Charm.luau" }
|
||||
},
|
||||
"react-charm": {
|
||||
"$className": "Folder",
|
||||
"src": { "$path": "packages/react-charm/src" },
|
||||
"__tests__": { "$path": "packages/react-charm/__tests__" },
|
||||
"React": { "$path": "packages/react-charm/React.luau" },
|
||||
"ReactRoblox": { "$path": "packages/react-charm/ReactRoblox.luau" },
|
||||
"Charm": { "$path": "packages/react-charm/Charm.luau" }
|
||||
|
|
@ -36,6 +39,7 @@
|
|||
"vide-charm": {
|
||||
"$className": "Folder",
|
||||
"src": { "$path": "packages/vide-charm/src" },
|
||||
"__tests__": { "$path": "packages/vide-charm/__tests__" },
|
||||
"Vide": { "$path": "packages/vide-charm/Vide.luau" },
|
||||
"Charm": { "$path": "packages/vide-charm/Charm.luau" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
local Charm = require("../../Charm")
|
||||
local client = require("../client")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../Charm")
|
||||
local client = require("../src/client")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
test.afterEach(function()
|
||||
client.removeAllSignals()
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local Charm = require("../../Charm")
|
||||
local client = require("../client")
|
||||
local config = require("../config")
|
||||
local server = require("../server")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../Charm")
|
||||
local client = require("../src/client")
|
||||
local config = require("../src/config")
|
||||
local server = require("../src/server")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
test.afterEach(function()
|
||||
server.reset()
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
local test = require("../../../tests/test")
|
||||
local test = require("../../tests/test")
|
||||
|
||||
test.describe("client", function()
|
||||
require("@self/client.test")
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
local config = require("../config")
|
||||
local patch = require("../patch")
|
||||
local test = require("../../../../tests/test")
|
||||
local config = require("../src/config")
|
||||
local patch = require("../src/patch")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local function mockArraySerdes(object: {}): {}
|
||||
if object[1] then
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local Charm = require("../../Charm")
|
||||
local config = require("../config")
|
||||
local patch = require("../patch")
|
||||
local server = require("../server")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../Charm")
|
||||
local config = require("../src/config")
|
||||
local patch = require("../src/patch")
|
||||
local server = require("../src/server")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
test.afterEach(function()
|
||||
server.reset()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
local Charm = require("../../Charm")
|
||||
local test = require("../../../../tests/test")
|
||||
local utils = require("../utils")
|
||||
local Charm = require("../Charm")
|
||||
local test = require("../../../tests/test")
|
||||
local utils = require("../src/utils")
|
||||
|
||||
test("should flatten functions", function()
|
||||
local input = {
|
||||
|
|
@ -5,7 +5,7 @@ registry = "https://github.com/UpliftGames/wally-index"
|
|||
realm = "shared"
|
||||
exclude = [
|
||||
"node_modules",
|
||||
"src/__tests__",
|
||||
"__tests__",
|
||||
"src/index.d.ts",
|
||||
"package.json",
|
||||
"Charm.luau",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local atom = Charm.atom
|
||||
local computed = Charm.computed
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local computed = Charm.computed
|
||||
local effect = Charm.effect
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local effect = Charm.effect
|
||||
local effectScope = Charm.effectScope
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
type ReactiveProxy<T = any> = Charm.ReactiveProxy<T>
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
local test = require("../../../tests/test")
|
||||
local test = require("../../tests/test")
|
||||
|
||||
local tests = {
|
||||
"computed",
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local signal = Charm.signal
|
||||
local listen = Charm.listen
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local signal = Charm.signal
|
||||
local mapped = Charm.mapped
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local signal = Charm.signal
|
||||
local computed = Charm.computed
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local signal = Charm.signal
|
||||
local computed = Charm.computed
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local effect = Charm.effect
|
||||
local reactive = Charm.reactive
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local signal = Charm.signal
|
||||
local effect = Charm.effect
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local signal = Charm.signal
|
||||
local computed = Charm.computed
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local atom = Charm.atom
|
||||
local computed = Charm.computed
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local computed = Charm.computed
|
||||
local effect = Charm.effect
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
local Charm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
local signal = Charm.signal
|
||||
local computed = Charm.computed
|
||||
|
|
@ -3,6 +3,6 @@ name = "littensy/charm"
|
|||
version = "0.11.0-rc.3"
|
||||
registry = "https://github.com/UpliftGames/wally-index"
|
||||
realm = "shared"
|
||||
exclude = ["node_modules", "src/__tests__", "src/index.d.ts", "package.json"]
|
||||
exclude = ["node_modules", "__tests__", "src/index.d.ts", "package.json"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
local React = require("../../../React")
|
||||
local ReactRoblox = require("../../../ReactRoblox")
|
||||
local React = require("../../React")
|
||||
local ReactRoblox = require("../../ReactRoblox")
|
||||
|
||||
type RenderedHook<Props, Result> = {
|
||||
result: Result,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
local test = require("../../../tests/test")
|
||||
local test = require("../../tests/test")
|
||||
|
||||
_G.__ROACT_17_MOCK_SCHEDULER__ = true
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
local Charm = require("../../Charm")
|
||||
local ReactCharm = require("../")
|
||||
local Charm = require("../Charm")
|
||||
local ReactCharm = require("../src")
|
||||
local renderHook = require("./helpers/renderHook")
|
||||
local test = require("../../../../tests/test")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
test("tracks signal state", function()
|
||||
local getState, setState = Charm.signal(0)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
local Charm = require("../../Charm")
|
||||
local ReactCharm = require("../")
|
||||
local Charm = require("../Charm")
|
||||
local ReactCharm = require("../src")
|
||||
local renderHook = require("./helpers/renderHook")
|
||||
local test = require("../../../../tests/test")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
test("tracks signal state", function()
|
||||
local getState, setState = Charm.signal(0)
|
||||
|
|
@ -5,7 +5,7 @@ registry = "https://github.com/UpliftGames/wally-index"
|
|||
realm = "shared"
|
||||
exclude = [
|
||||
"node_modules",
|
||||
"src/__tests__",
|
||||
"__tests__",
|
||||
"src/index.d.ts",
|
||||
"package.json",
|
||||
"React.luau",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local test = require("../../../tests/test")
|
||||
local test = require("../../tests/test")
|
||||
|
||||
test.describe("useSignalState", function()
|
||||
require("@self/useSignalState.test")
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
local Charm = require("../../Charm")
|
||||
local Vide = require("../../Vide")
|
||||
local VideCharm = require("../")
|
||||
local test = require("../../../../tests/test")
|
||||
local Charm = require("../Charm")
|
||||
local Vide = require("../Vide")
|
||||
local VideCharm = require("../src")
|
||||
local test = require("../../../tests/test")
|
||||
|
||||
test("tracks signal state", function()
|
||||
local getState, setState = Charm.signal(0)
|
||||
|
|
@ -5,7 +5,7 @@ registry = "https://github.com/UpliftGames/wally-index"
|
|||
realm = "shared"
|
||||
exclude = [
|
||||
"node_modules",
|
||||
"src/__tests__",
|
||||
"__tests__",
|
||||
"src/index.d.ts",
|
||||
"package.json",
|
||||
"Vide.luau",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
wally = "UpliftGames/wally@0.3.2"
|
||||
rojo = "rojo-rbx/rojo@7.6.1"
|
||||
stylua = "johnnymorganz/stylua@2.3.1"
|
||||
selene = "Kampfkarren/selene@0.29.0"
|
||||
luau-lsp = "johnnymorganz/luau-lsp@1.60.0"
|
||||
lute = "luau-lang/lute@0.1.0-nightly.20260112"
|
||||
selene = "Kampfkarren/selene@0.30.0"
|
||||
luau-lsp = "johnnymorganz/luau-lsp@1.62.0"
|
||||
lute = "luau-lang/lute@0.1.0-nightly.20260219"
|
||||
|
|
|
|||
|
|
@ -9,19 +9,19 @@ local describeInRoblox = test.describeIf(function()
|
|||
end)
|
||||
|
||||
test.describe("charm", function()
|
||||
require("../packages/charm/src/__tests__")
|
||||
require("../packages/charm/__tests__")
|
||||
end)
|
||||
|
||||
test.describe("charm-sync", function()
|
||||
require("../packages/charm-sync/src/__tests__")
|
||||
require("../packages/charm-sync/__tests__")
|
||||
end)
|
||||
|
||||
describeInRoblox("react-charm", function()
|
||||
require("../packages/react-charm/src/__tests__")
|
||||
require("../packages/react-charm/__tests__")
|
||||
end)
|
||||
|
||||
describeInRoblox("vide-charm", function()
|
||||
require("../packages/vide-charm/src/__tests__")
|
||||
require("../packages/vide-charm/__tests__")
|
||||
end)
|
||||
|
||||
test.finish()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue