Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
chore: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Feb 15, 2016
1 parent 481d37b commit c1f9728
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ var createPattern = function (path) {

var initMocha = function (files, mochaConfig) {
var mochaPath = path.dirname(require.resolve('mocha'))
files.unshift(createPattern(__dirname + '/adapter.js'))
files.unshift(createPattern(mochaPath + '/mocha.js'))
files.unshift(createPattern(path.join(__dirname, 'adapter.js')))
files.unshift(createPattern(path.join(mochaPath, 'mocha.js')))

if (mochaConfig && mochaConfig.reporter) {
files.unshift(createPattern(mochaPath + '/mocha.css'))
files.unshift(createPattern(path.join(mochaPath, 'mocha.css')))
}
}

Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@
"dependencies": {},
"devDependencies": {
"chai": "^3.4.1",
"eslint": "^0.22.1",
"eslint-config-standard": "^2.0.1",
"eslint-plugin-react": "^2.5.0",
"eslint": "^2.0.0",
"eslint-config-standard": "^5.1.0",
"eslint-plugin-promise": "^1.0.8",
"eslint-plugin-react": "^3.16.1",
"eslint-plugin-standard": "^1.3.2",
"grunt": "~0.4",
"grunt-auto-release": "~0.0.2",
"grunt-bump": "~0.0.7",
"grunt-contrib-jshint": "~0.10",
"grunt-eslint": "^14.0.0",
"grunt-bump": "~0.7.0",
"grunt-contrib-jshint": "~0.12",
"grunt-eslint": "^18.0.0",
"grunt-karma": "^0.12.1",
"grunt-npm": "~0.0.2",
"karma": "^0.13.15",
"karma-chai": "~0.1.0",
"karma-chrome-launcher": "^0.2.1",
"karma-firefox-launcher": "~0.1.0",
"karma-mocha": "~0.1.3",
"karma-mocha": "~0.2.1",
"karma-sinon": "~1.0.3",
"load-grunt-tasks": "^3.2.0",
"mocha": "^2.3.3",
Expand Down
5 changes: 0 additions & 5 deletions src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ var formatError = function (error) {
}

var processAssertionError = function (error_) {

var error

if (window.Mocha && error_.hasOwnProperty('showDiff')) {

error = {
name: error_.name,
message: error_.message,
Expand All @@ -30,11 +28,9 @@ var processAssertionError = function (error_) {
error.actual = window.Mocha.utils.stringify(error_.actual)
error.expected = window.Mocha.utils.stringify(error_.expected)
}

}

return error

}

// non-compliant version of Array::reduce.call (requires memo argument)
Expand Down Expand Up @@ -95,7 +91,6 @@ var createMochaReporterConstructor = function (tc, pathname) {
})

runner.on('fail', function (test, error) {

var simpleError = formatError(error)
var assertionError = processAssertionError(error)

Expand Down
5 changes: 0 additions & 5 deletions test/adapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,10 @@ describe('adapter mocha', function () {
expect(errLines[1]).to.equal('bar')
expect(errLines[2]).to.not.contain('foo')
})

})

describe('processAssertionError', function () {
it('should create object from mocha error', function () {

var err = new Error()
err.name = 'AssertionError'
err.message = 'expected \'something\' to deeply equal \'something else\''
Expand All @@ -432,7 +430,6 @@ describe('adapter mocha', function () {
})

it('should not create object from simple error', function () {

var err = new Error('Something wrong')

var error = processAssertionError(err)
Expand All @@ -441,7 +438,6 @@ describe('adapter mocha', function () {
})

it('should not pass actual and expected if showDiff is off', function () {

var err = new Error()
err.message = 'expected \'something\' to deeply equal \'something else\''
err.showDiff = false
Expand All @@ -458,5 +454,4 @@ describe('adapter mocha', function () {
expect(error).to.not.have.property('expected')
})
})

})

0 comments on commit c1f9728

Please sign in to comment.