From 41b9add5d6f4e29de7a240478f46a307cdf4b2bb Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 22 Jun 2014 14:55:41 +0800 Subject: [PATCH] Add spec for checking process.mainModule. --- spec/api-ipc-spec.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/api-ipc-spec.coffee b/spec/api-ipc-spec.coffee index 141818320551..86dbe810cff6 100644 --- a/spec/api-ipc-spec.coffee +++ b/spec/api-ipc-spec.coffee @@ -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')