/
githubmirror
/
atom
Обзор
Документация
Войти
/
githubmirror
/
atom
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
spec/default-directory-searcher-spec.js
42 строки
966 B
Rafael Oleza
Reformat all JS files using prettier
31 май 2019, 19:33
31 май 2019, 19:33
7f3f040
Код
Авторство
О чём код?
const DefaultDirectorySearcher = require('../src/default-directory-searcher'); const Task = require('../src/task'); const path = require('path'); describe('DefaultDirectorySearcher', function() { let searcher; let dirPath; beforeEach(function() { dirPath = path.resolve(__dirname, 'fixtures', 'dir'); searcher = new DefaultDirectorySearcher(); }); it('terminates the task after running a search', async function() { const options = { ignoreCase: false, includeHidden: false, excludeVcsIgnores: true, inclusions: [], globalExclusions: ['a-dir'], didMatch() {}, didError() {}, didSearchPaths() {} }; spyOn(Task.prototype, 'terminate').andCallThrough(); await searcher.search( [ { getPath() { return dirPath; } } ], /abcdefg/, options ); expect(Task.prototype.terminate).toHaveBeenCalled(); }); });