44
55local require = require (game :GetService (" ServerScriptService" ):FindFirstChild (" LoaderUtils" , true ).Parent ).bootstrapStory (script )
66
7- local BrioUtils = require (" BrioUtils" )
87local Brio = require (" Brio" )
8+ local BrioUtils = require (" BrioUtils" )
9+ local Jest = require (" Jest" )
910
10- return function ()
11- describe ( " BrioUtils.flatten({}) " , function ()
12- local brio = BrioUtils . flatten ({})
11+ local describe = Jest . Globals . describe
12+ local expect = Jest . Globals . expect
13+ local it = Jest . Globals . it
1314
14- describe (" should return a brio that" , function ()
15- it (" is a brio" , function ()
16- expect (brio ).to .be .a (" table" )
17- expect (Brio .isBrio (brio )).to .equal (true )
18- end )
15+ describe (" BrioUtils.flatten({})" , function ()
16+ local brio = BrioUtils .flatten ({})
1917
20- it (" is alive" , function ()
21- expect (not brio :IsDead ()).to .equal (true )
22- end )
18+ describe (" should return a brio that" , function ()
19+ it (" is a brio" , function ()
20+ expect (brio ).toEqual (expect .any (" table" ))
21+ expect (Brio .isBrio (brio )).toEqual (true )
22+ end )
23+
24+ it (" is alive" , function ()
25+ expect (not brio :IsDead ()).toEqual (true )
26+ end )
2327
24- it (" contains a table" , function ()
25- expect (brio :GetValue ()).to . be . a (" table" )
26- end )
28+ it (" contains a table" , function ()
29+ expect (brio :GetValue ()).toEqual ( expect . any (" table" ) )
30+ end )
2731
28- it (" contains a table with nothing in it" , function ()
29- expect (next (brio :GetValue ())).to .equal (nil )
30- end )
32+ it (" contains a table with nothing in it" , function ()
33+ expect (next (brio :GetValue ())).toEqual (nil )
3134 end )
3235 end )
36+ end )
3337
34- describe (" BrioUtils.flatten with out a brio in it" , function ()
35- local brio = BrioUtils .flatten ({
36- value = 5 ;
37- })
38+ describe (" BrioUtils.flatten with out a brio in it" , function ()
39+ local brio = BrioUtils .flatten ({
40+ value = 5 ;
41+ })
3842
39- describe (" should return a brio that" , function ()
40- it (" is a brio" , function ()
41- expect (brio ).to . be . a (" table" )
42- expect (Brio .isBrio (brio )).to . equal (true )
43- end )
43+ describe (" should return a brio that" , function ()
44+ it (" is a brio" , function ()
45+ expect (brio ).toEqual ( expect . any (" table" ) )
46+ expect (Brio .isBrio (brio )).toEqual (true )
47+ end )
4448
45- it (" is alive" , function ()
46- expect (not brio :IsDead ()).to . equal (true )
47- end )
49+ it (" is alive" , function ()
50+ expect (not brio :IsDead ()).toEqual (true )
51+ end )
4852
49- it (" contains a table" , function ()
50- expect (brio :GetValue ()).to . be . a (" table" )
51- end )
53+ it (" contains a table" , function ()
54+ expect (brio :GetValue ()).toEqual ( expect . any (" table" ) )
55+ end )
5256
53- it (" contains a table with value" , function ()
54- expect (brio :GetValue ().value ).to .equal (5 )
55- end )
57+ it (" contains a table with value" , function ()
58+ expect (brio :GetValue ().value ).toEqual (5 )
5659 end )
5760 end )
61+ end )
5862
59- describe (" BrioUtils.flatten a dead brio in it" , function ()
60- local brio = BrioUtils .flatten ({
61- value = Brio .DEAD ;
62- })
63+ describe (" BrioUtils.flatten a dead brio in it" , function ()
64+ local brio = BrioUtils .flatten ({
65+ value = Brio .DEAD ;
66+ })
6367
64- describe (" should return a brio that" , function ()
65- it (" is a brio" , function ()
66- expect (brio ).to . be . a (" table" )
67- expect (Brio .isBrio (brio )).to . equal (true )
68- end )
68+ describe (" should return a brio that" , function ()
69+ it (" is a brio" , function ()
70+ expect (brio ).toEqual ( expect . any (" table" ) )
71+ expect (Brio .isBrio (brio )).toEqual (true )
72+ end )
6973
70- it (" is dead" , function ()
71- expect (brio :IsDead ()).to .equal (true )
72- end )
74+ it (" is dead" , function ()
75+ expect (brio :IsDead ()).toEqual (true )
7376 end )
7477 end )
75- end
78+ end )
0 commit comments