Skip to content

Commit d6e4566

Browse files
show generated code in case of errors in jsdoc test
1 parent 36126b4 commit d6e4566

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/index.coffee

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,12 @@ describe 'js2cpp', () ->
407407

408408
describe 'jsdoc integration', () ->
409409
it 'allows you to create variables of unknown types', () ->
410-
ok /String x/.test cli.sync('/** @type {string} **/ var x;')
410+
javascript_code = cli.sync '/** @type {string} **/ var x;'
411+
ok /String x/.test(javascript_code), javascript_code
411412

412413
it 'allows you to create arrays of unknown types', () ->
413-
ok /Array<double>/.test cli.sync('/** @type {number[]} **/ var x = [];')
414+
javascript_code = cli.sync '/** @type {number[]} **/ var x = [];'
415+
ok /Array<double>/.test(javascript_code), javascript_code
414416

415417
it 'can use this (lite)', () ->
416418
javascript_code = """

0 commit comments

Comments
 (0)