diff --git a/Gruntfile.js b/Gruntfile.js index 8d94c4a..a4337e3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,7 +7,9 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-istanbul-coverage'); + grunt.loadNpmTasks('grunt-mocha-phantomjs'); grunt.loadNpmTasks('grunt-coveralls'); grunt.loadNpmTasks('grunt-jsbeautifier'); grunt.loadNpmTasks('grunt-browserify'); @@ -136,6 +138,23 @@ module.exports = function (grunt) { "src": ['test/fixtures/files/generated/json_to_xml/*'], "dest": 'test/fixtures/files/generated/xml_to_json' } + }, + connect: { + server: { + options: { + port: 8000, + hostname: '127.0.0.1' + } + } + }, + 'mocha_phantomjs': { + all: { + options: { + urls: [ + 'http://127.0.0.1:8000/browser/mocha_run.html' + ] + } + } } }); @@ -163,7 +182,9 @@ module.exports = function (grunt) { grunt.registerTask('re-json-to-xml', ['mkdir-test-temp', 'json-to-xml-main:test/fixtures/files/generated/xml_to_json:test/fixtures/files/generated/re_json_to_xml']); // Default task. - grunt.registerTask('default', ['beautify', 'jshint', 'mkdir-test-temp', 'mochaTest']); + grunt.registerTask('default', ['beautify', 'jshint', 'mkdir-test-temp', 'mochaTest', 'browser-test']); + + grunt.registerTask('browser-test', ['browserify:require', 'browserify:tests', 'connect', 'mocha_phantomjs']); grunt.registerTask('commit', ['jshint', 'mkdir-test-temp', 'mochaTest']); grunt.registerTask('mocha', ['mkdir-test-temp', 'mochaTest']); diff --git a/index.js b/index.js index d24e131..df1614a 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +"use strict"; + /* This script converts CCDA data in JSON format (originally generated from a Continuity of Care Document (CCD) in standard XML/CCDA format) back to XML/CCDA format. diff --git a/package.json b/package.json index cd6bb53..2333978 100644 --- a/package.json +++ b/package.json @@ -41,12 +41,14 @@ "grunt": "0.4.x", "grunt-blue-button": "^1.3.0", "grunt-browserify": "^3.2.0", + "grunt-contrib-connect": "^0.9.0", "grunt-contrib-jshint": "0.8.x", "grunt-contrib-watch": "0.6.x", "grunt-coveralls": "*", "grunt-express-server": "0.4.x", "grunt-istanbul-coverage": "*", "grunt-jsbeautifier": "^0.2.7", + "grunt-mocha-phantomjs": "^0.6.0", "grunt-mocha-test": "0.8.x", "mocha": "1.17.x", "mocha-lcov-reporter": "0.0.1", diff --git a/test/fixtures/json/CCD_1.json b/test/fixtures/json/CCD_1.json index be81ff4..158033b 100644 --- a/test/fixtures/json/CCD_1.json +++ b/test/fixtures/json/CCD_1.json @@ -1960,7 +1960,7 @@ ] }, "meta": { - "version": "1.3.0-beta.8", + "version": "1.3.0-beta.10", "identifiers": [ { "identifier": "2.16.840.1.113883.19.5.99999.1", diff --git a/test/fixtures/json/SampleCCDDocument.json b/test/fixtures/json/SampleCCDDocument.json index ecfd428..470f1ac 100644 --- a/test/fixtures/json/SampleCCDDocument.json +++ b/test/fixtures/json/SampleCCDDocument.json @@ -519,7 +519,7 @@ ] }, "meta": { - "version": "1.3.0-beta.8", + "version": "1.3.0-beta.10", "identifiers": [ { "identifier": "db734647-fc99-424c-a864-7e3cda82e703" diff --git a/test/fixtures/json/VA_CCD_Sample_File_Version_12_5_1.json b/test/fixtures/json/VA_CCD_Sample_File_Version_12_5_1.json index 7445d2d..4740db6 100644 --- a/test/fixtures/json/VA_CCD_Sample_File_Version_12_5_1.json +++ b/test/fixtures/json/VA_CCD_Sample_File_Version_12_5_1.json @@ -1048,7 +1048,7 @@ ] }, "meta": { - "version": "1.3.0-beta.8", + "version": "1.3.0-beta.10", "identifiers": [ { "identifier": "2.16.840.1.113883.4.349", diff --git a/test/fixtures/json/Vitera.json b/test/fixtures/json/Vitera.json index 168ec23..c66cf22 100644 --- a/test/fixtures/json/Vitera.json +++ b/test/fixtures/json/Vitera.json @@ -7266,7 +7266,7 @@ ] }, "meta": { - "version": "1.3.0-beta.8", + "version": "1.3.0-beta.10", "identifiers": [ { "identifier": "2.16.840.1.113883.3.140.1.0.6.1.13092597.12456139" diff --git a/test/fixtures/json/Vitera_CCDA_SMART_Sample.json b/test/fixtures/json/Vitera_CCDA_SMART_Sample.json index 168ec23..c66cf22 100644 --- a/test/fixtures/json/Vitera_CCDA_SMART_Sample.json +++ b/test/fixtures/json/Vitera_CCDA_SMART_Sample.json @@ -7266,7 +7266,7 @@ ] }, "meta": { - "version": "1.3.0-beta.8", + "version": "1.3.0-beta.10", "identifiers": [ { "identifier": "2.16.840.1.113883.3.140.1.0.6.1.13092597.12456139"