]> khamidou — GitHub mirrors - electron.git/commitdiff
Add spec for checking process.mainModule.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 22 Jun 2014 06:55:41 +0000 (14:55 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 22 Jun 2014 06:55:41 +0000 (14:55 +0800)
spec/api-ipc-spec.coffee

index 141818320551dcc51744bc28d4e8a779f16794eb..86dbe810cff6265c67516d17977b812e0a0d05bb 100644 (file)
@@ -18,6 +18,10 @@ describe 'ipc module', ->
       a = remote.require path.join(fixtures, 'module', 'id.js')
       assert.equal a.id, 1127
 
+    it 'should search module from the user app', ->
+      assert.equal remote.process.mainModule.filename, path.resolve(__dirname, 'static', 'main.js')
+      assert.equal remote.process.mainModule.paths[0], path.resolve(__dirname, 'static', 'node_modules')
+
   describe 'remote.createFunctionWithReturnValue', ->
     it 'should be called in browser synchronously', ->
       buf = new Buffer('test')