Skip to content

Commit

Permalink
Upgade to [email protected] (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron authored Oct 1, 2024
1 parent c67c555 commit 74819fc
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 24 deletions.
30 changes: 15 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.

2 changes: 1 addition & 1 deletion bsc-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@types/node": "^14.18.41",
"@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

0 comments on commit 74819fc

Please sign in to comment.