summaryrefslogtreecommitdiffstats
path: root/lib/models/__tests__/config.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/__tests__/config.js')
-rw-r--r--lib/models/__tests__/config.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/models/__tests__/config.js b/lib/models/__tests__/config.js
index ff04ffd..abad754 100644
--- a/lib/models/__tests__/config.js
+++ b/lib/models/__tests__/config.js
@@ -55,6 +55,36 @@ describe('Config', function() {
expect(world).toBe(2);
});
});
+
+ describe('toReducedVersion', function() {
+ it('must only return diffs for simple values', function() {
+ var _config = Config.createWithValues({
+ gitbook: '3.0.0'
+ });
+
+ var reducedVersion = _config.toReducedVersion();
+
+ expect(reducedVersion.toJS()).toEqual({
+ gitbook: '3.0.0'
+ });
+ });
+
+ it('must only return diffs for deep values', function() {
+ var _config = Config.createWithValues({
+ structure: {
+ readme: 'intro.md'
+ }
+ });
+
+ var reducedVersion = _config.toReducedVersion();
+
+ expect(reducedVersion.toJS()).toEqual({
+ structure: {
+ readme: 'intro.md'
+ }
+ });
+ });
+ });
});