mirror of
https://github.com/atom/atom.git
synced 2026-01-15 01:48:15 -05:00
Mock process.cwd to make test pass in headless mode
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user