mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Fail focused specs on CI
This ensures focused specs never end up as green builds
This commit is contained in:
parent
7f3279e789
commit
597942c4ac
@ -7,6 +7,8 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) ->
|
|||||||
|
|
||||||
{TerminalReporter} = require 'jasmine-tagged'
|
{TerminalReporter} = require 'jasmine-tagged'
|
||||||
|
|
||||||
|
disableFocusMethods() if process.env.JANKY_SHA1
|
||||||
|
|
||||||
TimeReporter = require './time-reporter'
|
TimeReporter = require './time-reporter'
|
||||||
timeReporter = new TimeReporter()
|
timeReporter = new TimeReporter()
|
||||||
|
|
||||||
@ -38,3 +40,10 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) ->
|
|||||||
$('body').append $$ -> @div id: 'jasmine-content'
|
$('body').append $$ -> @div id: 'jasmine-content'
|
||||||
|
|
||||||
jasmineEnv.execute()
|
jasmineEnv.execute()
|
||||||
|
|
||||||
|
disableFocusMethods = ->
|
||||||
|
['fdescribe', 'ffdescribe', 'fffdescribe', 'fit', 'ffit', 'fffit'].forEach (methodName) ->
|
||||||
|
focusMethod = window[methodName]
|
||||||
|
window[methodName] = (description) ->
|
||||||
|
error = new Error('Focused spec is running on CI')
|
||||||
|
focusMethod description, -> throw error
|
||||||
|
Loading…
Reference in New Issue
Block a user