mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Update mock tests
This commit is contained in:
parent
04e28f390d
commit
b3c600acc3
13 changed files with 94 additions and 246 deletions
|
|
@ -1,12 +1,13 @@
|
|||
local typeof = typeof
|
||||
|
||||
if not game then
|
||||
script = (require :: any) "test/wrap-require"
|
||||
typeof = require "test/mock".typeof
|
||||
script = require "test/wrap-require"
|
||||
typeof = require "test/mock".typeof :: any
|
||||
end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
type Node<T> = graph.Node<T>
|
||||
|
||||
local throw = require(script.Parent.throw)
|
||||
local bind = require(script.Parent.bind)
|
||||
local _, is_action = require(script.Parent.action)()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
local warn = warn -- todo
|
||||
local warn = warn
|
||||
|
||||
if not game then
|
||||
script = (require :: any) "test/wrap-require"
|
||||
script = require "test/wrap-require"
|
||||
warn = print
|
||||
end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
type Node<T> = graph.Node<T>
|
||||
local get = graph.get
|
||||
local set_effect = graph.set_effect
|
||||
local capture = graph.capture
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
local Instance = Instance
|
||||
local typeof = typeof
|
||||
|
||||
if not game then
|
||||
script = (require :: any) "test/wrap-require"
|
||||
script = require "test/wrap-require"
|
||||
Instance = require("test/mock").Instance
|
||||
typeof = require("test/mock").typeof
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
|
||||
-- todo
|
||||
local Enum = Enum
|
||||
local Color3 = Color3
|
||||
local Vector3 = Vector3
|
||||
|
||||
if not game then
|
||||
local mock = require "test/mock"
|
||||
Enum = mock.Enum :: any
|
||||
Color3 = mock.Color3 :: any
|
||||
Vector3 = mock.Vector3 :: any
|
||||
Enum = mock.Enum
|
||||
Color3 = mock.Color3
|
||||
Vector3 = mock.Vector3
|
||||
end
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
if not game then script = (require :: any) "test/wrap-require" end
|
||||
if not game then script = require "test/wrap-require" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
local create = graph.create
|
||||
local get = graph.get
|
||||
local capture_and_link = graph.capture_and_link
|
||||
|
||||
local function derive<T>(fn: () -> T): () -> T
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
if not game then script = (require :: any) "test/wrap-require" end
|
||||
if not game then script = require "test/wrap-require" end
|
||||
|
||||
local flags = require(script.Parent.flags)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-- v0.1.0
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
if not game then script = (require :: any) "test/wrap-require" end
|
||||
if not game then script = require "test/wrap-require" end
|
||||
|
||||
local create = require(script.create)
|
||||
local source = require(script.source)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
if not game then script = (require :: any) "test/wrap-require" end
|
||||
if not game then script = require "test/wrap-require" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
type Node<T> = graph.Node<T>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
if not game then script = (require :: any) "test/wrap-require" end
|
||||
if not game then script = require "test/wrap-require" end
|
||||
|
||||
--[[
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
if not game then script = (require :: any) "test/wrap-require" end
|
||||
if not game then script = require "test/wrap-require" end
|
||||
|
||||
local graph = require(script.Parent.graph)
|
||||
local set_effect = graph.set_effect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue