Skip to content

Commit

Permalink
Fix/compiler issues (#224)
Browse files Browse the repository at this point in the history
* fixes testrunner naming diagnostic

* fixes failng tests
  • Loading branch information
georgejecook authored May 11, 2023
1 parent d68258c commit bc309ec
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
8 changes: 4 additions & 4 deletions framework/src/source/BaseTestReporter.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace rooibos
public config = invalid
public allStats = invalid

function new(testRunner as dynamic)
m.testRunner = testRunner
m.config = testRunner.config
m.allStats = testRunner.stats
function new(runner as dynamic)
m.testRunner = runner
m.config = runner.config
m.allStats = runner.stats
end function

function reportResults(allStats as dynamic)
Expand Down
4 changes: 2 additions & 2 deletions framework/src/source/ConsoleTestReporter.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ namespace rooibos

private lineWidth = 60

function new(testRunner)
function new(runner)
'bs:disable-next-line
super(testRunner)
super(runner)
if m.config.lineWidth <> invalid
m.lineWidth = m.config.lineWidth
else
Expand Down
7 changes: 5 additions & 2 deletions tests/src/source/Common.spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ namespace tests

newManager = Rooibos.Common.makePathStubbable(manager, "manager.item.data")

m.assertEqual(newManager, {
m.assertEqual(newManager, { id: "data" })

m.assertEqual(manager, {
id: "man"
item: {
id: "item"
Expand All @@ -74,8 +76,9 @@ namespace tests
}

newManager = Rooibos.Common.makePathStubbable(manager, "manager.item.data")
m.assertEqual(newManager, { id: "data" })

m.assertEqual(newManager, {
m.assertEqual(manager, {
id: "man"
item: {
data: {
Expand Down
6 changes: 5 additions & 1 deletion tests/src/source/Expect.spec.bs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@

namespace tests

@noEarlyExit
@suite
class ExpectTests extends rooibos.BaseTestSuite

protected override function beforeEach()
super.beforeEach()
m.isAutoAssertingMocks = true
end function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'+ Helper
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
1 change: 0 additions & 1 deletion tests/src/source/NodeExample.spec.bs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
namespace tests
@only
@SGNode("NodeExample")
@suite
class NodeExampleTests extends rooibos.BaseTestSuite
Expand Down

0 comments on commit bc309ec

Please sign in to comment.