Skip to content

Commit

Permalink
mocha-phantomjs browser tests are now functional and pass for parse g…
Browse files Browse the repository at this point in the history
…enerate parse test
  • Loading branch information
Afsin Ustundag committed Nov 19, 2014
1 parent f5e44f3 commit f509c37
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 6 deletions.
23 changes: 22 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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'
]
}
}
}
});

Expand Down Expand Up @@ -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']);
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/json/CCD_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/json/SampleCCDDocument.json
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
]
},
"meta": {
"version": "1.3.0-beta.8",
"version": "1.3.0-beta.10",
"identifiers": [
{
"identifier": "db734647-fc99-424c-a864-7e3cda82e703"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/json/VA_CCD_Sample_File_Version_12_5_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/json/Vitera.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/json/Vitera_CCDA_SMART_Sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f509c37

Please sign in to comment.