Skip to content

Commit

Permalink
Merge branch 'release-6.0.0' of https://github.com/rokucommunity/rooibos
Browse files Browse the repository at this point in the history
 into rooibos-cli
  • Loading branch information
TwitchBronBron committed Oct 1, 2024
2 parents 6c84500 + 435b2d4 commit 336ef18
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
node-version: "16.20.2"
architecture: 'x64' # fix for macos-latest
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: cd bsc-plugin && echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: cd bsc-plugin && npm ci
- run: cd bsc-plugin && npm run build
#create npm package
Expand Down
143 changes: 135 additions & 8 deletions bsc-plugin/CHANGELOG.md

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions bsc-plugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bsc-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rooibos-roku",
"version": "6.0.0-alpha.1",
"version": "6.0.0-alpha.38",
"description": "simple, flexible, fun brightscript test framework for roku scenegraph apps - roku brighterscript plugin",
"scripts": {
"preversion": "npm run build && npm run lint && npm run test",
Expand Down Expand Up @@ -49,7 +49,7 @@
"@types/yargs": "^15.0.5",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"brighterscript": "^1.0.0-alpha.36",
"brighterscript": "^1.0.0-alpha.38",
"chai": "^4.2.0",
"chai-subset": "^1.6.0",
"coveralls": "^3.0.0",
Expand Down
3 changes: 0 additions & 3 deletions bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ export class CodeCoverageProcessor {
ForEachStatement: (ds, parent, owner, key) => {
this.addStatement(ds);
ds.tokens.forEach.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: for each`;
},
ExitWhileStatement: (ds, parent, owner, key) => {

},
PrintStatement: (ds, parent, owner, key) => {
this.addStatement(ds);
Expand Down
8 changes: 5 additions & 3 deletions bsc-plugin/src/lib/rooibos/RawCodeExpression.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { BscFile,
WalkOptions,
WalkVisitor } from 'brighterscript';
import type { BscFile, WalkOptions, WalkVisitor } from 'brighterscript';
import { Expression } from 'brighterscript';
import * as brighterscript from 'brighterscript';
import type { BrsTranspileState } from 'brighterscript/dist/parser/BrsTranspileState';
Expand Down Expand Up @@ -33,4 +31,8 @@ export class RawCodeExpression extends Expression {
public walk(visitor: WalkVisitor, options: WalkOptions) {
//nothing to walk
}

public clone() {
return new RawCodeExpression(this.source, this.sourceFile, brighterscript.util.cloneLocation({ range: this.range } as any).range);
}
}
8 changes: 8 additions & 0 deletions bsc-plugin/src/lib/rooibos/RawCodeStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export class RawCodeStatement extends Statement {
public walk(visitor: WalkVisitor, options: WalkOptions) {
//nothing to walk
}

public clone() {
return new RawCodeStatement(this.source, this.sourceFile, util.cloneLocation({ range: this.range } as any).range);
}
}

export class RawCodeExpression extends Expression {
Expand Down Expand Up @@ -81,4 +85,8 @@ export class RawCodeExpression extends Expression {
public walk(visitor: WalkVisitor, options: WalkOptions) {
//nothing to walk
}

public clone() {
return new RawCodeExpression(this.source, this.sourceFile, util.cloneLocation({ range: this.range } as any).range);
}
}
1 change: 0 additions & 1 deletion bsc-plugin/src/lib/rooibos/TestSuiteBuilder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,6 @@ end namespace
@suite("Rooibos assertion tests")
class AssertionTests extends rooibos.BaseTestSuite
@describe("group1")
@it("one")
@params("http://google.com/thing", true)
@params("#'_!!@#%", false)
Expand Down
4 changes: 3 additions & 1 deletion bsc-plugin/src/lib/rooibos/TestSuiteBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
import type {
BrsFile,
ClassStatement,
FunctionStatement,
MethodStatement
} from 'brighterscript';
import {
isFunctionStatement,
isMethodStatement,
util
} from 'brighterscript';
Expand Down Expand Up @@ -203,7 +205,7 @@ export class TestSuiteBuilder {

let sanitizedTestName = this.sanitizeFunctionName(this.currentGroup.name) + '_' + this.sanitizeFunctionName(annotation.name);
statement.tokens.name.text = sanitizedTestName;
statement.func.functionStatement.tokens.name.text = sanitizedTestName;
statement.func.findAncestor<MethodStatement>(isMethodStatement).tokens.name.text = sanitizedTestName;

if (numberOfParams > 0) {
let index = 0;
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rooibos",
"name": "rooibos-roku",
"version": "6.0.0-alpha.1",
"description": "simple, flexible, fun brightscript test framework for roku scenegraph apps",
"scripts": {
Expand Down

0 comments on commit 336ef18

Please sign in to comment.