mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
The goal is that `loadPackage` will be the go-to place for loading all kinds of resources out of directories. `requireExtension` was only designed to load and activate extension modules.
15 lines
480 B
CoffeeScript
15 lines
480 B
CoffeeScript
RootView = require 'root-view'
|
|
|
|
describe "the `atom` global", ->
|
|
describe ".loadPackage(name)", ->
|
|
extension = null
|
|
|
|
beforeEach ->
|
|
rootView = new RootView
|
|
extension = require "package-with-extension"
|
|
|
|
it "requires and activates the package's main module if it exists", ->
|
|
spyOn(rootView, 'activateExtension').andCallThrough()
|
|
atom.loadPackage("package-with-extension")
|
|
expect(rootView.activateExtension).toHaveBeenCalledWith(extension)
|