mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Add spec for re-registering schema after unloading package
This commit is contained in:
@@ -154,7 +154,6 @@ describe "PackageManager", ->
|
||||
|
||||
it "registers the config schema in the package's metadata, if present", ->
|
||||
pack = atom.packages.loadPackage("package-with-json-config-schema")
|
||||
|
||||
expect(atom.config.getSchema('package-with-json-config-schema')).toEqual {
|
||||
type: 'object'
|
||||
properties: {
|
||||
@@ -165,6 +164,18 @@ describe "PackageManager", ->
|
||||
|
||||
expect(pack.mainModule).toBeNull()
|
||||
|
||||
atom.packages.unloadPackage('package-with-json-config-schema')
|
||||
atom.config.clear()
|
||||
|
||||
pack = atom.packages.loadPackage("package-with-json-config-schema")
|
||||
expect(atom.config.getSchema('package-with-json-config-schema')).toEqual {
|
||||
type: 'object'
|
||||
properties: {
|
||||
a: {type: 'number', default: 5}
|
||||
b: {type: 'string', default: 'five'}
|
||||
}
|
||||
}
|
||||
|
||||
describe "when a package does not have deserializers, view providers or a config schema in its package.json", ->
|
||||
beforeEach ->
|
||||
mockLocalStorage()
|
||||
|
||||
Reference in New Issue
Block a user