mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-12 22:50:54 +03:00
Mock process.cwd to make test pass in headless mode
This commit is contained in:
parent
badba2810e
commit
eb2a6a3388
@ -86,6 +86,7 @@ describe 'ModuleCache', ->
|
||||
exports.load = function() { require('underscore-plus'); };
|
||||
"""
|
||||
|
||||
spyOn(process, 'cwd').andReturn('/') # Required when running this test from CLI
|
||||
packageMain = require(indexPath)
|
||||
Module._findPath.reset()
|
||||
expect(-> packageMain.load()).toThrow()
|
||||
|
Loading…
Reference in New Issue
Block a user