Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: update eslint dependencies #167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
if (NEWXML) {
suite = suites[browser.id] = builder.create('unitTest')
suite.att('version', '1')
exposee = suite.ele('file', {'path': 'fixedString'})
exposee = suite.ele('file', { 'path': 'fixedString' })
} else {
suite = suites[browser.id] = builder.create('testsuite')
suite.att('name', browser.name)
.att('package', pkgName)
.att('timestamp', timestamp)
.att('id', 0)
.att('hostname', os.hostname())
.att('package', pkgName)
.att('timestamp', timestamp)
.att('id', 0)
.att('hostname', os.hostname())
var propertiesElement = suite.ele('properties')
propertiesElement.ele('property', {name: 'browser.fullName', value: browser.fullName})
propertiesElement.ele('property', { name: 'browser.fullName', value: browser.fullName })

// add additional properties passed in through the config
for (var property in properties) {
if (properties.hasOwnProperty(property)) {
propertiesElement.ele('property', {name: property, value: properties[property]})
propertiesElement.ele('property', { name: property, value: properties[property] })
}
}
}
Expand All @@ -101,7 +101,7 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
newOutputFile = outputFile
} else if (outputFile != null) {
var dir = useBrowserName ? path.join(outputDir, safeBrowserName)
: outputDir
: outputDir
newOutputFile = path.join(dir, outputFile)
} else if (useBrowserName) {
newOutputFile = path.join(outputDir, 'TESTS-' + safeBrowserName + '.xml')
Expand All @@ -117,7 +117,7 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for

pendingFileWritings++
helper.mkdirIfNotExists(path.dirname(newOutputFile), function () {
fs.writeFile(newOutputFile, xmlToOutput.end({pretty: true}), function (err) {
fs.writeFile(newOutputFile, xmlToOutput.end({ pretty: true }), function (err) {
if (err) {
log.warn('Cannot write JUnit xml\n\t' + err.message)
} else {
Expand Down Expand Up @@ -239,10 +239,10 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
if (!result.success) {
result.log.forEach(function (err) {
if (!NEWXML) {
spec.ele('failure', {type: ''}, formatError(err))
spec.ele('failure', { type: '' }, formatError(err))
} else {
// In new XML format, an obligatory 'message' attribute in failure
spec.ele('failure', {message: formatError(err)})
spec.ele('failure', { message: formatError(err) })
}
})
}
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@
"license": "MIT",
"devDependencies": {
"chai": "^3.5.0",
"eslint": "^3.11.1",
"eslint-config-standard": "^5.3.1",
"eslint-plugin-promise": "^1.3.2",
"eslint-plugin-standard": "^1.3.1",
"eslint": "^5.12.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"grunt": "^1.0.1",
"grunt-bump": "^0.8.0",
"grunt-cli": "^1.2.0",
"grunt-conventional-changelog": "^6.1.0",
"grunt-conventional-github-releaser": "^1.0.0",
"grunt-eslint": "^18.1.0",
"grunt-eslint": "^21.0.0",
"grunt-npm": "^0.0.2",
"grunt-simple-mocha": "^0.4.1",
"libxmljs": "^0.19.5",
Expand Down
3 changes: 3 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"env": {
"mocha": true
},
"rules": {
"no-unused-expressions": "off"
}
}