Skip to content

Commit b616808

Browse files
gkelloggdavidlehn
authored andcommitted
Add doap:release/revision to EARL output.
FIXME: hard-codes version number. (cherry picked from commit 811f16c6ddd1e618de9306bd100e9c88634b82da)
1 parent 88d780d commit b616808

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/earl-report.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ function EarlReport(options) {
3636
'earl:mode': {'@type': '@id'},
3737
'earl:test': {'@type': '@id'},
3838
'earl:outcome': {'@type': '@id'},
39-
'dc:date': {'@type': 'xsd:date'}
39+
'dc:date': {'@type': 'xsd:dateTime'},
40+
'doap:created': {'@type': 'xsd:date'}
4041
},
4142
'@id': 'https://github.com/digitalbazaar/jsonld.js',
4243
'@type': [
@@ -61,16 +62,21 @@ function EarlReport(options) {
6162
'foaf:name': 'Dave Longley',
6263
'foaf:homepage': 'https://github.com/dlongley'
6364
},
64-
'dc:date': {
65-
'@value': today,
66-
'@type': 'xsd:date'
65+
'doap:release': {
66+
'doap:name': '',
67+
'doap:revision': '',
68+
'doap:created': today
6769
},
6870
'subjectOf': []
6971
};
7072
/* eslint-enable quote-props */
73+
// FIXME: read this from somewhere
74+
version = 'v3.0.1'
7175
this._report['@id'] += '#' + this.id;
7276
this._report['doap:name'] += ' ' + this.id;
7377
this._report['dc:title'] += ' ' + this.id;
78+
this._report['doap:release']['doap:name'] = this._report['doap:name'] + ' ' + version;
79+
this._report['doap:release']['doap:revision'] = version;
7480
}
7581

7682
EarlReport.prototype.addAssertion = function(test, pass) {

0 commit comments

Comments
 (0)