/
githubmirror
/
atom
Обзор
Документация
Войти
/
githubmirror
/
atom
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.52.0
spec/buffered-node-process-spec.coffee
39 строк
1 KB
case
Remove Duplicate Require Statements and Unify Syntax on '
15 янв 2016, 23:35
15 янв 2016, 23:35
8c5c795
Код
Авторство
О чём код?
path = require 'path' BufferedNodeProcess = require '../src/buffered-node-process' describe "BufferedNodeProcess", -> it "executes the script in a new process", -> exit = jasmine.createSpy('exitCallback') output = '' stdout = (lines) -> output += lines error = '' stderr = (lines) -> error += lines args = ['hi'] command = path.join(__dirname, 'fixtures', 'script.js') new BufferedNodeProcess({command, args, stdout, stderr, exit}) waitsFor -> exit.callCount is 1 runs -> expect(output).toBe 'hi' expect(error).toBe '' expect(args).toEqual ['hi'] it "suppresses deprecations in the new process", -> exit = jasmine.createSpy('exitCallback') output = '' stdout = (lines) -> output += lines error = '' stderr = (lines) -> error += lines command = path.join(__dirname, 'fixtures', 'script-with-deprecations.js') new BufferedNodeProcess({command, stdout, stderr, exit}) waitsFor -> exit.callCount is 1 runs -> expect(output).toBe 'hi' expect(error).toBe ''