Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
test(Generator): test include api as json
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed Nov 22, 2016
1 parent 03c4840 commit d8bfc53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ test('raml generator', t => {

const generate = generator({
templates: {
'test.js': function () {
return 'success'
'test.js': function (api: any) {
return 'success: ' + api.title
}
}
});

parser.loadApi(musicRaml).then(
function(api: any) {
const json = api.expand(true).toJSON();
t.deepEqual(generate(json).files, { 'test.js': 'success' });
t.deepEqual(generate(json).files, { 'test.js': 'success: World Music API' });

t.end()
}
Expand Down

0 comments on commit d8bfc53

Please sign in to comment.