]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[benchmark] Load a missing locale
authorIskren Chernev <iskren.chernev@gmail.com>
Fri, 24 Apr 2020 17:56:41 +0000 (20:56 +0300)
committerIskren Chernev <iskren.chernev@gmail.com>
Fri, 24 Apr 2020 17:56:41 +0000 (20:56 +0300)
benchmarks/load-missing.js [new file with mode: 0644]

diff --git a/benchmarks/load-missing.js b/benchmarks/load-missing.js
new file mode 100644 (file)
index 0000000..c18e92e
--- /dev/null
@@ -0,0 +1,13 @@
+var Benchmark = require('benchmark'),
+    moment = require("./../moment.js");
+
+module.exports = {
+    name: 'load missing locale',
+    tests: [{
+        fn: function() {
+            // falls back to en
+            moment.locale('en-US');
+        },
+        async: true,
+    }],
+};