diff --git a/test/test-prop_parser-parse-keywords.js b/test/test-prop_parser-parse-keywords.js index 3595bf8..6bc4234 100644 --- a/test/test-prop_parser-parse-keywords.js +++ b/test/test-prop_parser-parse-keywords.js @@ -24,23 +24,31 @@ var common = require( './common' ), assert = require( 'assert' ), - parse = common.require( 'prop_parser' ).parseKeywords; + parse = common.require( 'prop_parser' ).parseKeywords, + + data = parse( 'final static abstract foo' ), + keywords = data.keywords +; -var data = parse( 'final static abstract foo' ), - keywords = data.keywords; +( function testProperlyRetrievesName() +{ + assert.equal( + data.name, + 'foo', + "Property keyword parser properly retrieves name" + ); +} )(); -assert.equal( - data.name, - 'foo', - "Property keyword parser properly retrieves name" -); -assert.ok( - ( ( keywords['final'] === true ) - && ( keywords['static'] === true ) - && ( keywords['abstract'] === true ) - ), - "Property keyword parser properly retrieves all keywords" -); +( function testProperlyRetrievesAllKeywords() +{ + assert.ok( + ( ( keywords['final'] === true ) + && ( keywords['static'] === true ) + && ( keywords['abstract'] === true ) + ), + "Property keyword parser properly retrieves all keywords" + ); +} )();