Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / pretty-format / build / plugins / asymmetric_matcher.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/pretty-format/build/plugins/asymmetric_matcher.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/pretty-format/build/plugins/asymmetric_matcher.js
new file mode 100644 (file)
index 0000000..c48407f
--- /dev/null
@@ -0,0 +1,105 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', {
+  value: true
+});
+exports.test = exports.serialize = undefined;
+
+var _collections = require('../collections');
+
+/**
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+const asymmetricMatcher = Symbol.for('jest.asymmetricMatcher');
+const SPACE = ' ';
+
+const serialize = (exports.serialize = (
+  val,
+  config,
+  indentation,
+  depth,
+  refs,
+  printer
+) => {
+  const stringedValue = val.toString();
+
+  if (
+    stringedValue === 'ArrayContaining' ||
+    stringedValue === 'ArrayNotContaining'
+  ) {
+    if (++depth > config.maxDepth) {
+      return '[' + stringedValue + ']';
+    }
+    return (
+      stringedValue +
+      SPACE +
+      '[' +
+      (0, _collections.printListItems)(
+        val.sample,
+        config,
+        indentation,
+        depth,
+        refs,
+        printer
+      ) +
+      ']'
+    );
+  }
+
+  if (
+    stringedValue === 'ObjectContaining' ||
+    stringedValue === 'ObjectNotContaining'
+  ) {
+    if (++depth > config.maxDepth) {
+      return '[' + stringedValue + ']';
+    }
+    return (
+      stringedValue +
+      SPACE +
+      '{' +
+      (0, _collections.printObjectProperties)(
+        val.sample,
+        config,
+        indentation,
+        depth,
+        refs,
+        printer
+      ) +
+      '}'
+    );
+  }
+
+  if (
+    stringedValue === 'StringMatching' ||
+    stringedValue === 'StringNotMatching'
+  ) {
+    return (
+      stringedValue +
+      SPACE +
+      printer(val.sample, config, indentation, depth, refs)
+    );
+  }
+
+  if (
+    stringedValue === 'StringContaining' ||
+    stringedValue === 'StringNotContaining'
+  ) {
+    return (
+      stringedValue +
+      SPACE +
+      printer(val.sample, config, indentation, depth, refs)
+    );
+  }
+
+  return val.toAsymmetricMatcher();
+});
+
+const test = (exports.test = val => val && val.$$typeof === asymmetricMatcher);
+
+exports.default = {serialize: serialize, test: test};