mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
1. Core specs located in spec/ 2. Internal package specs in src/packages 3. Bundled package specs in node_modules 4. User package specs in ~/.atom/packages
28 lines
957 B
CoffeeScript
28 lines
957 B
CoffeeScript
require 'window'
|
|
|
|
measure 'spec suite require time', ->
|
|
fsUtils = require 'fs-utils'
|
|
path = require 'path'
|
|
require 'spec-helper'
|
|
|
|
requireSpecs = (directoryPath, specType) ->
|
|
for specPath in fsUtils.listTreeSync(path.join(directoryPath, 'spec')) when /-spec\.coffee$/.test specPath
|
|
require specPath
|
|
for spec in jasmine.getEnv().currentRunner().specs() when not spec.specType?
|
|
spec.specType = specType
|
|
|
|
# Run core specs
|
|
requireSpecs(window.resourcePath, 'core')
|
|
|
|
# Run internal package specs
|
|
for packagePath in fsUtils.listTreeSync(config.bundledPackagesDirPath)
|
|
requireSpecs(packagePath, 'internal')
|
|
|
|
# Run bundled package specs
|
|
for packagePath in fsUtils.listTreeSync(config.nodeModulesDirPath) when atom.isInternalPackage(packagePath)
|
|
requireSpecs(packagePath, 'bundled')
|
|
|
|
# Run user package specs
|
|
for packagePath in fsUtils.listTreeSync(config.userPackagesDirPath)
|
|
requireSpecs(packagePath, 'user')
|