mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 23:48:05 +03:00
Merge pull request #11994 from atom/ns-allow-test-directory
Make interactive package tests work with a top-level 'test' directory
This commit is contained in:
commit
89f6604f91
@ -1,5 +1,6 @@
|
||||
{ipcRenderer} = require 'electron'
|
||||
path = require 'path'
|
||||
fs = require 'fs-plus'
|
||||
{Disposable, CompositeDisposable} = require 'event-kit'
|
||||
Grim = require 'grim'
|
||||
scrollbarStyle = require 'scrollbar-style'
|
||||
@ -122,6 +123,12 @@ class WorkspaceElement extends HTMLElement
|
||||
[projectPath] = @project.relativizePath(activePath)
|
||||
else
|
||||
[projectPath] = @project.getPaths()
|
||||
ipcRenderer.send('run-package-specs', path.join(projectPath, 'spec')) if projectPath
|
||||
if projectPath
|
||||
specPath = path.join(projectPath, 'spec')
|
||||
testPath = path.join(projectPath, 'test')
|
||||
if not fs.existsSync(specPath) and fs.existsSync(testPath)
|
||||
specPath = testPath
|
||||
|
||||
ipcRenderer.send('run-package-specs', specPath)
|
||||
|
||||
module.exports = WorkspaceElement = document.registerElement 'atom-workspace', prototype: WorkspaceElement.prototype
|
||||
|
Loading…
Reference in New Issue
Block a user