diff --git a/spec/config-spec.coffee b/spec/config-spec.coffee index 6845b0c89..4e7aad526 100644 --- a/spec/config-spec.coffee +++ b/spec/config-spec.coffee @@ -442,6 +442,26 @@ describe "Config", -> schema = null describe '.setSchema(keyPath, schema)', -> + it 'creates a properly nested schema', -> + schema = + type: 'object' + properties: + anInt: + type: 'integer' + default: 12 + + atom.config.setSchema('foo.bar', schema) + + expect(atom.config.getSchema('foo')).toEqual + type: 'object' + properties: + bar: + type: 'object' + properties: + anInt: + type: 'integer' + default: 12 + it 'sets defaults specified by the schema', -> schema = type: 'object' @@ -480,26 +500,6 @@ describe "Config", -> type: 'integer' default: 12 - it 'creates a properly nested schema', -> - schema = - type: 'object' - properties: - anInt: - type: 'integer' - default: 12 - - atom.config.setSchema('foo.bar', schema) - - expect(atom.config.getSchema('foo')).toEqual - type: 'object' - properties: - bar: - type: 'object' - properties: - anInt: - type: 'integer' - default: 12 - describe '.getSchema(keyPath)', -> schema = type: 'object'