diff --git a/package.json b/package.json index c972172..5f60810 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "coffee-script": "~1.7.1", "yargs": "~1.3.3", - "protagonist-experimental": "~0.18.1", + "protagonist-experimental": "0.18.3", "boutique": "git+ssh://git@github.com:apiaryio/boutique.git" }, "devDependencies": { diff --git a/test/fixtures/blueprint.parseresult+sourcemap.json b/test/fixtures/blueprint.parseresult+sourcemap.json index ea1665c..ecd28c6 100644 --- a/test/fixtures/blueprint.parseresult+sourcemap.json +++ b/test/fixtures/blueprint.parseresult+sourcemap.json @@ -35,7 +35,15 @@ "headers": [], "attributes": {}, "body": "Hello World!\n", - "schema": "" + "schema": "", + "assets": { + "body": { + "source": "Hello World!\n" + }, + "schema": { + "source": "" + } + } } ] } diff --git a/test/fixtures/blueprint.parseresult.json b/test/fixtures/blueprint.parseresult.json index ffe83a2..71a2fac 100644 --- a/test/fixtures/blueprint.parseresult.json +++ b/test/fixtures/blueprint.parseresult.json @@ -35,7 +35,15 @@ "headers": [], "attributes": {}, "body": "Hello World!\n", - "schema": "" + "schema": "", + "assets": { + "body": { + "source": "Hello World!\n" + }, + "schema": { + "source": "" + } + } } ] } diff --git a/test/integration/cli-test.coffee b/test/integration/cli-test.coffee index 111388e..5685b87 100644 --- a/test/integration/cli-test.coffee +++ b/test/integration/cli-test.coffee @@ -41,10 +41,9 @@ describe 'Command line interface', () -> it 'stdout should contain the parse result fixture', () -> ast_fixture = require '../fixtures/blueprint.parseresult.json' - expected = JSON.stringify ast_fixture, null, 2 - expected += '\n' + parsedStdout = JSON.parse stdout - assert.equal stdout, expected + assert.deepEqual parsedStdout, ast_fixture describe 'parsing blueprint with source map', () -> before (done) -> @@ -57,10 +56,9 @@ describe 'Command line interface', () -> it 'stdout should contain the source map parser result fixture', () -> ast_fixture = require '../fixtures/blueprint.parseresult+sourcemap.json' - expected = JSON.stringify ast_fixture, null, 2 - expected += '\n' + parsedStdout = JSON.parse stdout - assert.equal stdout, expected + assert.deepEqual parsedStdout, ast_fixture describe 'parsing invalid blueprint', () -> before (done) ->