This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| void function run() { | |
| describe("Tests of it", () => { | |
| it("prefixes its message with ""It""", () => { | |
| savecontent variable="message" { | |
| it("IS A TEST MESSAGE", () => {}) | |
| } | |
| tinyTest.results.pass-- | |
| expect(message).toInclude("It IS A TEST MESSAGE") | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| abstract component { | |
| function init() { | |
| writeOutput("AbstractBase init called<br>") | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| function run() { | |
| afterAll(() => { | |
| writeOutput("afterAll ran OK") | |
| }) | |
| describe("Tests of afterAll", () => { | |
| it("is a simple test", () => { | |
| expect(true).toBeTrue() | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| function run() { | |
| describe("some tests", () => { | |
| it("a passing test", () => { | |
| expect(true).toBe(true) | |
| }) | |
| }) | |
| } | |
| tinyTest.runTests() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style>.tt{background-color:black;color:white;font-family:monospace}.tt div {margin-left:1em}.tt .p{color:green}.tt .f{color:red}.tt .e{background-color:red;color:black}</style><cfscript>_={r={p=0,f=0,e=0},runTests=()=>{writeOutput('<div class="tt">');run();_.u();writeOutput('</div>')},u=()=>{savecontent variable="local.r"{writeOutput("<div>Results: [Pass: #_.r.p#] [Fail: #_.r.f#] [Error: #_.r.e#] [Total: #_.r.p + _.r.f + _.r.e#]</div>")}writeOutput(r)},c=[],d=(l,g)=>{_.i(()=>{try{writeOutput("#l#<br>");_.c.push({});g()}catch(any e){writeOutput("Error: #e.message#<br>")}finally{_.c.pop()}})},s=(c)=>{return _.c.last().x=c},t=(c)=>{return _.c.last().y=c},w=(c)=>{return _.c.last().z=c},it=(l,t)=>{_.i(()=>{try{writeOutput("It #l#: ");_.c.filter((c)=>c.keyExists("x")).each((c)=>c.x());d=_.c.filter((c)=>c.keyExists("z")).reduce((r,c)=>r.prepend(c),[]).reduce((d,c)=>()=>c.z(d),t);d();_.c.filter((c)=>c.keyExists("y")).reduce((j,c)=>j.prepend(c),[]).each((c)=>c.y());_.l()}catch(TT e){_.k()}catch(any e){_.b(e)}})},e=(a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .tinytest {background-color: black; color:white; font-family:monospace} | |
| .tinytest div {margin-left: 1em} | |
| .tinyTest .pass {color:green;} | |
| .tinyTest .fail {color:red;} | |
| .tinyTest .error {background-color:red; color:black} | |
| </style> | |
| <cfscript> | |
| tinyTest = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .tinytest {background-color: black; color:white; font-family:monospace} | |
| .tinytest div {margin-left: 1em} | |
| .tinyTest .pass {color:green;} | |
| .tinyTest .fail {color:red;} | |
| .tinyTest .error {background-color:red; color:black} | |
| </style> | |
| <cfscript> | |
| baseContext = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .tinytest {background-color: black; color:white; font-family:monospace} | |
| .tinytest div {margin-left: 1em} | |
| .tinyTest .pass {color:green;} | |
| .tinyTest .fail {color:red;} | |
| .tinyTest .error {background-color:red; color:black} | |
| </style> | |
| <cfscript> | |
| tinyTest = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| // tests | |
| void function run() { | |
| beforeAll(() => { | |
| tinyTest.debug.setByBeforeAll = true | |
| }) | |
| describe("Tests of TinyTestFramework", () => { | |
| describe("Tests of it", () => { | |
| it("prefixes its message with ""It""", () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| i = 0 | |
| f = 0.0 | |
| d = createObject("java", "java.lang.Double").init(0) | |
| writeDump([ | |
| i = [ | |
| i = i, | |
| "i === i" = i === i, | |
| "i.equals(i)" = i.equals(i), |