Skip to content

Commit

Permalink
Added test for formatJson case
Browse files Browse the repository at this point in the history
  • Loading branch information
markwpearce committed Jul 25, 2023
1 parent 7b36acc commit 569c944
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Scope.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1981,6 +1981,18 @@ describe('Scope', () => {
expectZeroDiagnostics(program);
});

it('should correctly validate formatJson', () => {
program.setFile(`source/main.brs`, `
sub main()
obj = {hello: "world"}
print formatJson(obj) ' 2nd param not included
print formatJson(obj, 0) ' 2nd param as integer
print formatJson(obj, "0") ' 2nd param as string
end sub
`);
program.validate();
expectZeroDiagnostics(program);
});

describe('inheritance', () => {
it('inherits callables from parent', () => {
Expand Down

0 comments on commit 569c944

Please sign in to comment.