Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/jju/test/update/deep-object.yaml')
-rw-r--r--node_modules/jju/test/update/deep-object.yaml36
1 files changed, 36 insertions, 0 deletions
diff --git a/node_modules/jju/test/update/deep-object.yaml b/node_modules/jju/test/update/deep-object.yaml
new file mode 100644
index 000000000..e0795a378
--- /dev/null
+++ b/node_modules/jju/test/update/deep-object.yaml
@@ -0,0 +1,36 @@
+input: |
+ {
+ "foo": {
+ "bar": {
+ "baz": {
+ "quux": "4"
+ }
+ }
+ }
+ }
+
+output: |
+ {
+ "foo": {
+ "bar": {
+ "baz": {
+ "quux": "4"
+ },
+ "qwe": {
+ "rty": {
+ "aaa": {
+ "bbb": 1
+ }
+ }
+ }
+ }
+ }
+ }
+
+test: !!js/function |
+ function(jju, input) {
+ obj = jju.parse(input)
+ obj.foo.bar.qwe = {rty: {aaa: {bbb: 1}}}
+ return jju.update(input, obj, {mode:'json'})
+ }
+