         describe 'node', ->
             it 'creates bundle', (done) ->
                 path = createApp (err, _, stderr) ->
-                    cp.exec "cd #{path} && #{EXEC_NEFT} build node", (err, _, stderr) ->
+                    cp.exec "cd #{path} && #{NEFT_BIN_PATH} build node", (err, _, stderr) ->
                         assert.ok fs.existsSync pathUtils.join(path, 'build/app-node-develop.js')
                         done err or stderr
 
         describe 'browser', ->
             it 'creates bundle', (done) ->
                 path = createApp (err, _, stderr) ->
-                    cp.exec "cd #{path} && #{EXEC_NEFT} build browser", (err, _, stderr) ->
+                    cp.exec "cd #{path} && #{NEFT_BIN_PATH} build browser", (err, _, stderr) ->
                         assert.ok fs.existsSync pathUtils.join(path, 'build/app-browser-develop.js')
                         done err or stderr
 


isWin32 = os.platform() is 'win32'

NEFT_BIN_PATH = pathUtils.join(fs.realpathSync('./'), 'bin/neft')
EXEC_NEFT = if isWin32 then "#{NEFT_BIN_PATH}.cmd" else "sh #{NEFT_BIN_PATH}"

createApp = (callback) ->
    path = pathUtils.join os.tmpdir(), 'neft-project'
    fs.removeSync path

    cpCmd = "#{EXEC_NEFT} create #{path}"
    cp.exec cpCmd, callback
    path


        describe 'node', ->
            it 'starts node server', (done) ->
                path = createApp (err, _, stderr) ->
                    child = cp.exec "cd #{path} && #{NEFT_BIN_PATH} run node", (err, _, stderr) ->
                        done err or stderr

                    child.stdout.on 'data', (msg) ->
