Skip to content

Commit f4c61b6

Browse files
committed
Fix lint issues.
1 parent 26246d3 commit f4c61b6

File tree

2 files changed

+52
-48
lines changed

2 files changed

+52
-48
lines changed

tests/earl-report.js

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,52 @@
66
* Copyright (c) 2011-2022 Digital Bazaar, Inc. All rights reserved.
77
*/
88

9+
/* eslint-disable quote-props */
10+
const _benchmarkContext = {
11+
'jldb': 'http://json-ld.org/benchmarks/vocab#',
12+
'rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
13+
'xsd': 'http://www.w3.org/2001/XMLSchema#',
14+
15+
// environment description
16+
'jldb:Environment': {'@type': '@id'},
17+
18+
// per environment
19+
// label
20+
// ex: 'Setup 1' (for reports)
21+
'jldb:label': {'@type': 'xsd:string'},
22+
// architecture type
23+
// ex: x86
24+
'jldb:arch': {'@type': 'xsd:string'},
25+
// cpu model description (may show multiple cpus)
26+
// ex: 'Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz'
27+
'jldb:cpu': {'@type': 'xsd:string'},
28+
// count of cpus, may not be uniform, just informative
29+
'jldb:cpuCount': {'@type': 'xsd:integer'},
30+
// platform name
31+
// ex: linux
32+
'jldb:platform': {'@type': 'xsd:string'},
33+
// runtime name
34+
// ex: Node.js, Chromium, Ruby
35+
'jldb:runtime': {'@type': 'xsd:string'},
36+
// runtime version
37+
// ex: v14.19.0
38+
'jldb:runtimeVersion': {'@type': 'xsd:string'},
39+
// arbitrary comment
40+
'jldb:comment': 'rdfs:comment',
41+
42+
// benchmark result
43+
'jldb:BenchmarkResult': {'@type': '@id'},
44+
45+
// use in earl:Assertion, type jldb:BenchmarkResult
46+
'jldb:result': {'@type': '@id'},
47+
48+
// per BenchmarkResult
49+
'jldb:environment': {'@type': '@id'},
50+
'jldb:hz': {'@type': 'xsd:float'},
51+
'jldb:rme': {'@type': 'xsd:float'}
52+
};
53+
/* eslint-enable quote-props */
54+
955
/**
1056
* EARL Reporter
1157
*/
@@ -154,50 +200,4 @@ class EarlReport {
154200
}
155201
}
156202

157-
/* eslint-disable quote-props */
158-
const _benchmarkContext = {
159-
'jldb': 'http://json-ld.org/benchmarks/vocab#',
160-
'rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
161-
'xsd': 'http://www.w3.org/2001/XMLSchema#',
162-
163-
// environment description
164-
'jldb:Environment': {'@type': '@id'},
165-
166-
// per environment
167-
// label
168-
// ex: 'Setup 1' (for reports)
169-
'jldb:label': {'@type': 'xsd:string'},
170-
// architecture type
171-
// ex: x86
172-
'jldb:arch': {'@type': 'xsd:string'},
173-
// cpu model description (may show multiple cpus)
174-
// ex: 'Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz'
175-
'jldb:cpu': {'@type': 'xsd:string'},
176-
// count of cpus, may not be uniform, just informative
177-
'jldb:cpuCount': {'@type': 'xsd:integer'},
178-
// platform name
179-
// ex: linux
180-
'jldb:platform': {'@type': 'xsd:string'},
181-
// runtime name
182-
// ex: Node.js, Chromium, Ruby
183-
'jldb:runtime': {'@type': 'xsd:string'},
184-
// runtime version
185-
// ex: v14.19.0
186-
'jldb:runtimeVersion': {'@type': 'xsd:string'},
187-
// arbitrary comment
188-
'jldb:comment': 'rdfs:comment',
189-
190-
// benchmark result
191-
'jldb:BenchmarkResult': {'@type': '@id'},
192-
193-
// use in earl:Assertion, type jldb:BenchmarkResult
194-
'jldb:result': {'@type': '@id'},
195-
196-
// per BenchmarkResult
197-
'jldb:environment': {'@type': '@id'},
198-
'jldb:hz': {'@type': 'xsd:float'},
199-
'jldb:rme': {'@type': 'xsd:float'}
200-
};
201-
/* eslint-enable quote-props */
202-
203203
module.exports = EarlReport;

tests/test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,10 +580,12 @@ async function addTest(manifest, test, tests) {
580580
test.manifest = manifest;
581581
const description = test_id + ' ' + (test.purpose || test.name);
582582

583+
/*
583584
// build test options for omit checks
584585
const testInfo = TEST_TYPES[getJsonLdTestType(test)];
585586
const params = testInfo.params.map(param => param(test));
586587
const testOptions = params[1];
588+
*/
587589

588590
// number of parallel jobs for benchmarks
589591
const jobTests = benchmarkOptions.enabled ? benchmarkOptions.jobs : [1];
@@ -594,7 +596,7 @@ async function addTest(manifest, test, tests) {
594596
title: description + ` (jobs=${jobs})`,
595597
f: makeFn({
596598
test,
597-
run: ({test, testInfo, params}) => {
599+
run: ({/*test, */testInfo, params}) => {
598600
// skip Promise.all
599601
if(jobs === 1 && fast1) {
600602
return jsonld[testInfo.fn](...params);
@@ -699,10 +701,11 @@ function makeFn({
699701
}
700702

701703
// skip based on description regex
704+
/*
702705
if(testInfo.skip && testInfo.skip.descriptionRegex) {
703706
testInfo.skip.descriptionRegex.forEach(function(re) {
704707
if(re.test(description)) {
705-
if(options.verboseSkip) {
708+
if(verboseSkip) {
706709
console.log('Skipping test due to description:', {
707710
id: test['@id'],
708711
name: test.name,
@@ -713,6 +716,7 @@ function makeFn({
713716
}
714717
});
715718
}
719+
*/
716720

717721
// Make expandContext absolute to the manifest
718722
if(test.hasOwnProperty('option') && test.option.expandContext) {

0 commit comments

Comments
 (0)