Skip to content

Commit

Permalink
Always use global it, beforeEach and afterEach methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rafeca committed Feb 28, 2019
1 parent 2dd2c29 commit a93808d
Show file tree
Hide file tree
Showing 37 changed files with 7 additions and 102 deletions.
2 changes: 0 additions & 2 deletions packages/about/spec/about-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { it, beforeEach } = require('./helpers/async-spec-helpers')

describe('About', () => {
let workspaceElement

Expand Down
7 changes: 1 addition & 6 deletions packages/about/spec/about-status-bar-spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const {
it,
beforeEach,
afterEach,
conditionPromise
} = require('./helpers/async-spec-helpers')
const { conditionPromise } = require('./helpers/async-spec-helpers')
const MockUpdater = require('./mocks/updater')

describe('the status bar', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/about/spec/update-view-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { shell } = require('electron')
const { it, beforeEach, afterEach } = require('./helpers/async-spec-helpers')
const main = require('../lib/main')
const AboutView = require('../lib/components/about-view')
const UpdateView = require('../lib/components/update-view')
Expand Down
2 changes: 0 additions & 2 deletions packages/dev-live-reload/spec/dev-live-reload-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { it, fit, ffit, afterEach, beforeEach } = require('./async-spec-helpers') // eslint-disable-line no-unused-vars

describe('Dev Live Reload', () => {
describe('package activation', () => {
let [pack, mainModule] = []
Expand Down
7 changes: 1 addition & 6 deletions packages/dev-live-reload/spec/ui-watcher-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ const path = require('path')

const UIWatcher = require('../lib/ui-watcher')

const {
it,
afterEach,
beforeEach,
conditionPromise
} = require('./async-spec-helpers')
const { conditionPromise } = require('./async-spec-helpers')

describe('UIWatcher', () => {
let uiWatcher = null
Expand Down
1 change: 0 additions & 1 deletion packages/grammar-selector/spec/grammar-selector-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('path')
const SelectListView = require('atom-select-list')
const { it, fit, ffit, beforeEach, afterEach } = require('./async-spec-helpers') // eslint-disable-line

describe('GrammarSelector', () => {
let [editor, textGrammar, jsGrammar] = []
Expand Down
2 changes: 0 additions & 2 deletions packages/link/spec/link-spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const { shell } = require('electron')

const { it, fit, ffit, afterEach, beforeEach } = require('./async-spec-helpers') // eslint-disable-line no-unused-vars

describe('link package', () => {
beforeEach(async () => {
await atom.packages.activatePackage('language-gfm')
Expand Down
1 change: 0 additions & 1 deletion spec/application-delegate-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @babel */

import { it } from './async-spec-helpers'
import ApplicationDelegate from '../src/application-delegate'

describe('ApplicationDelegate', function () {
Expand Down
7 changes: 1 addition & 6 deletions spec/atom-environment-spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const {
it,
beforeEach,
afterEach,
conditionPromise
} = require('./async-spec-helpers')
const { conditionPromise } = require('./async-spec-helpers')
const fs = require('fs')
const path = require('path')
const temp = require('temp').track()
Expand Down
1 change: 0 additions & 1 deletion spec/atom-paths-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @babel */

import { it, beforeEach, afterEach } from './async-spec-helpers'
import { app } from 'remote'
import atomPaths from '../src/atom-paths'
import fs from 'fs-plus'
Expand Down
5 changes: 0 additions & 5 deletions spec/command-installer-spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
const path = require('path')
const fs = require('fs-plus')
const temp = require('temp').track()
const {
it,
beforeEach,
afterEach
} = require('./async-spec-helpers')
const CommandInstaller = require('../src/command-installer')

describe('CommandInstaller on #darwin', () => {
Expand Down
1 change: 0 additions & 1 deletion spec/command-registry-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const CommandRegistry = require('../src/command-registry')
const _ = require('underscore-plus')
const { it, beforeEach, afterEach } = require('./async-spec-helpers')

describe('CommandRegistry', () => {
let registry, parent, child, grandchild
Expand Down
6 changes: 0 additions & 6 deletions spec/config-file-spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
const {
it,

beforeEach,
afterEach
} = require('./async-spec-helpers')
const fs = require('fs-plus')
const path = require('path')
const temp = require('temp').track()
Expand Down
1 change: 0 additions & 1 deletion spec/dock-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const Grim = require('grim')

import { it } from './async-spec-helpers'
import etch from 'etch'

const getNextUpdatePromise = () => etch.getScheduler().nextUpdatePromise
Expand Down
1 change: 0 additions & 1 deletion spec/git-repository-provider-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const temp = require('temp').track()
const { Directory } = require('pathwatcher')
const GitRepository = require('../src/git-repository')
const GitRepositoryProvider = require('../src/git-repository-provider')
const { it, beforeEach } = require('./async-spec-helpers')

describe('GitRepositoryProvider', () => {
let provider
Expand Down
1 change: 0 additions & 1 deletion spec/git-repository-spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const { it, beforeEach, afterEach } = require('./async-spec-helpers')
const path = require('path')
const fs = require('fs-plus')
const temp = require('temp').track()
Expand Down
2 changes: 0 additions & 2 deletions spec/grammar-registry-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { it, beforeEach, afterEach } = require('./async-spec-helpers')

const dedent = require('dedent')
const path = require('path')
const fs = require('fs-plus')
Expand Down
2 changes: 0 additions & 2 deletions spec/history-manager-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { it, beforeEach, afterEach } = require('./async-spec-helpers')

const { HistoryManager, HistoryProject } = require('../src/history-manager')
const StateStore = require('../src/state-store')

Expand Down
2 changes: 0 additions & 2 deletions spec/native-watcher-registry-spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/** @babel */

import { it, beforeEach } from './async-spec-helpers'

import path from 'path'
import { Emitter } from 'event-kit'

Expand Down
1 change: 0 additions & 1 deletion spec/package-manager-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const { Disposable } = require('atom')
const { buildKeydownEvent } = require('../src/keymap-extensions')
const { mockLocalStorage } = require('./spec-helper')
const ModuleCache = require('../src/module-cache')
const { it, beforeEach, afterEach } = require('./async-spec-helpers')

describe('PackageManager', () => {
function createTestElement (className) {
Expand Down
2 changes: 0 additions & 2 deletions spec/package-transpilation-registry-spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/** @babel */
import path from 'path'

import { it, beforeEach } from './async-spec-helpers'

import PackageTranspilationRegistry from '../src/package-transpilation-registry'

const originalCompiler = {
Expand Down
5 changes: 0 additions & 5 deletions spec/pane-container-spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const PaneContainer = require('../src/pane-container')
const {
it,

beforeEach
} = require('./async-spec-helpers')

describe('PaneContainer', () => {
let confirm, params
Expand Down
7 changes: 1 addition & 6 deletions spec/pane-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ const { Emitter } = require('event-kit')
const Grim = require('grim')
const Pane = require('../src/pane')
const PaneContainer = require('../src/pane-container')
const {
it,
beforeEach,
conditionPromise,
timeoutPromise
} = require('./async-spec-helpers')
const { conditionPromise, timeoutPromise } = require('./async-spec-helpers')

describe('Pane', () => {
let confirm, showSaveDialog, deserializerDisposable
Expand Down
2 changes: 1 addition & 1 deletion spec/path-watcher-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @babel */

import { it, beforeEach, afterEach, promisifySome } from './async-spec-helpers'
import { promisifySome } from './async-spec-helpers'
import tempCb from 'temp'
import fsCb from 'fs-plus'
import path from 'path'
Expand Down
1 change: 0 additions & 1 deletion spec/reopen-project-menu-manager-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @babel */

import { it, beforeEach } from './async-spec-helpers'
import { Disposable } from 'event-kit'

const ReopenProjectMenuManager = require('../src/reopen-project-menu-manager')
Expand Down
1 change: 0 additions & 1 deletion spec/state-store-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/** @babel */
import { it } from './async-spec-helpers'

const StateStore = require('../src/state-store.js')

Expand Down
8 changes: 1 addition & 7 deletions spec/text-editor-component-spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
const {
it,

beforeEach,
afterEach,
conditionPromise
} = require('./async-spec-helpers')
const { conditionPromise } = require('./async-spec-helpers')

const Random = require('../script/node_modules/random-seed')
const { getRandomBufferRange, buildRandomLines } = require('./helpers/random')
Expand Down
5 changes: 0 additions & 5 deletions spec/text-editor-element-spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
const {
it,

beforeEach
} = require('./async-spec-helpers')
const TextEditor = require('../src/text-editor')
const TextEditorElement = require('../src/text-editor-element')

Expand Down
1 change: 0 additions & 1 deletion spec/text-editor-registry-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const TextEditorRegistry = require('../src/text-editor-registry')
const TextEditor = require('../src/text-editor')
const TextBuffer = require('text-buffer')
const { Point, Range } = TextBuffer
const { it } = require('./async-spec-helpers')
const dedent = require('dedent')

describe('TextEditorRegistry', function () {
Expand Down
7 changes: 0 additions & 7 deletions spec/text-editor-spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
const {
it,

beforeEach,
afterEach
} = require('./async-spec-helpers')

const fs = require('fs')
const path = require('path')
const temp = require('temp').track()
Expand Down
1 change: 0 additions & 1 deletion spec/text-mate-language-mode-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const TextBuffer = require('text-buffer')
const { Point } = TextBuffer
const _ = require('underscore-plus')
const dedent = require('dedent')
const { it, beforeEach, afterEach } = require('./async-spec-helpers')

describe('TextMateLanguageMode', () => {
let languageMode, buffer, config
Expand Down
2 changes: 0 additions & 2 deletions spec/tree-sitter-language-mode-spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* eslint-disable no-template-curly-in-string */

const { it, beforeEach, afterEach } = require('./async-spec-helpers')

const fs = require('fs')
const path = require('path')
const dedent = require('dedent')
Expand Down
2 changes: 0 additions & 2 deletions spec/update-process-env-spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/** @babel */
/* eslint-env jasmine */

import { it, beforeEach, afterEach } from './async-spec-helpers'
import path from 'path'
import childProcess from 'child_process'
import {
Expand Down
2 changes: 0 additions & 2 deletions spec/uri-handler-registry-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import url from 'url'

import { it } from './async-spec-helpers'

import URIHandlerRegistry from '../src/uri-handler-registry'

describe('URIHandlerRegistry', () => {
Expand Down
2 changes: 0 additions & 2 deletions spec/workspace-center-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

const TextEditor = require('../src/text-editor')

import { it } from './async-spec-helpers'

describe('WorkspaceCenter', () => {
describe('.observeTextEditors()', () => {
it('invokes the observer with current and future text editors', () => {
Expand Down
1 change: 0 additions & 1 deletion spec/workspace-element-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const etch = require('etch')
const path = require('path')
const temp = require('temp').track()
const { Disposable } = require('event-kit')
const { it, beforeEach, afterEach } = require('./async-spec-helpers')

const getNextUpdatePromise = () => etch.getScheduler().nextUpdatePromise

Expand Down
7 changes: 1 addition & 6 deletions spec/workspace-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ const _ = require('underscore-plus')
const fstream = require('fstream')
const fs = require('fs-plus')
const AtomEnvironment = require('../src/atom-environment')
const {
it,
beforeEach,
afterEach,
conditionPromise
} = require('./async-spec-helpers')
const { conditionPromise } = require('./async-spec-helpers')

describe('Workspace', () => {
let workspace
Expand Down

0 comments on commit a93808d

Please sign in to comment.