squint-cljs 0.13.194 → 0.14.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  import * as squint_core from 'squint-cljs/core.js';
2
2
  import * as squint_multi from 'squint-cljs/src/squint/multi.js';
3
3
  import * as clojure_DOT_string from 'squint-cljs/src/squint/string.js';
4
- var _STAR_current_env_STAR_ = null;
5
- var _STAR_current_reporter_STAR_ = "cljs.test/default";
4
+ var _STAR_current_env_STAR_ = ({val: null});
5
+ var _STAR_current_reporter_STAR_ = ({val: "cljs.test/default"});
6
6
  var current_reporter = function () {
7
- const or__23719__auto__1 = _STAR_current_reporter_STAR_;
8
- if (squint_core.truth_(or__23719__auto__1)) {
9
- return or__23719__auto__1} else {
7
+ const or__132408__auto__1 = _STAR_current_reporter_STAR_.val;
8
+ if (squint_core.truth_(or__132408__auto__1)) {
9
+ return or__132408__auto__1} else {
10
10
  return "cljs.test/default"};
11
11
 
12
12
  };
@@ -15,29 +15,29 @@ return ({"report-counters": ({"test": 0, "pass": 0, "fail": 0, "error": 0}), "te
15
15
 
16
16
  };
17
17
  var get_current_env = function () {
18
- const or__23719__auto__1 = _STAR_current_env_STAR_;
19
- if (squint_core.truth_(or__23719__auto__1)) {
20
- return or__23719__auto__1} else {
18
+ const or__132408__auto__1 = _STAR_current_env_STAR_.val;
19
+ if (squint_core.truth_(or__132408__auto__1)) {
20
+ return or__132408__auto__1} else {
21
21
  return empty_env()};
22
22
 
23
23
  };
24
24
  var set_env_BANG_ = function (env) {
25
- _STAR_current_env_STAR_ = env;
25
+ _STAR_current_env_STAR_.val = env;
26
26
  return env;
27
27
 
28
28
  };
29
29
  var clear_env_BANG_ = function () {
30
- _STAR_current_env_STAR_ = null;
30
+ _STAR_current_env_STAR_.val = null;
31
31
  return null;
32
32
 
33
33
  };
34
34
  var update_current_env_BANG_ = (() => {
35
35
  const f1 = (function (var_args) {
36
36
  const args21 = [];
37
- const len__23467__auto__2 = arguments.length;
37
+ const len__29152__auto__2 = arguments.length;
38
38
  let i33 = 0;
39
39
  while(true){
40
- if ((i33 < len__23467__auto__2)) {
40
+ if ((i33 < len__29152__auto__2)) {
41
41
  args21.push((arguments[i33]));
42
42
  let G__4 = (i33 + 1);
43
43
  i33 = G__4;
@@ -45,8 +45,8 @@ continue;
45
45
  };break;
46
46
  }
47
47
  ;
48
- const argseq__23695__auto__5 = (((2 < args21.length)) ? (args21.slice(2)) : (null));
49
- return f1.cljs$core$IFn$_invoke$arity$variadic((arguments[0]), (arguments[1]), argseq__23695__auto__5);
48
+ const argseq__29378__auto__5 = (((2 < args21.length)) ? (args21.slice(2)) : (null));
49
+ return f1.cljs$core$IFn$_invoke$arity$variadic((arguments[0]), (arguments[1]), argseq__29378__auto__5);
50
50
 
51
51
  });
52
52
  f1.cljs$core$IFn$_invoke$arity$variadic = (function (ks, f, args) {
@@ -60,17 +60,17 @@ return f1;
60
60
 
61
61
  })();
62
62
  var testing_contexts_str = function () {
63
- const temp__23371__auto__1 = squint_core.seq(squint_core.get(get_current_env(), "testing-contexts"));
64
- if (squint_core.truth_(temp__23371__auto__1)) {
65
- const contexts2 = temp__23371__auto__1;
63
+ const temp__132336__auto__1 = squint_core.seq(squint_core.get(get_current_env(), "testing-contexts"));
64
+ if (squint_core.truth_(temp__132336__auto__1)) {
65
+ const contexts2 = temp__132336__auto__1;
66
66
  return clojure_DOT_string.join(" ", squint_core.reverse(contexts2));
67
67
  };
68
68
 
69
69
  };
70
70
  var testing_vars_str = function () {
71
- const temp__23371__auto__1 = squint_core.seq(squint_core.get(get_current_env(), "testing-vars"));
72
- if (squint_core.truth_(temp__23371__auto__1)) {
73
- const vars2 = temp__23371__auto__1;
71
+ const temp__132336__auto__1 = squint_core.seq(squint_core.get(get_current_env(), "testing-vars"));
72
+ if (squint_core.truth_(temp__132336__auto__1)) {
73
+ const vars2 = temp__132336__auto__1;
74
74
  return clojure_DOT_string.join(" ", squint_core.map(squint_core.str, vars2));
75
75
  };
76
76
 
@@ -85,10 +85,10 @@ var current_test_str = function () {
85
85
  const vars1 = testing_vars_str();
86
86
  const ctx2 = testing_contexts_str();
87
87
  if (squint_core.truth_((() => {
88
- const and__23759__auto__3 = vars1;
89
- if (squint_core.truth_(and__23759__auto__3)) {
88
+ const and__132415__auto__3 = vars1;
89
+ if (squint_core.truth_(and__132415__auto__3)) {
90
90
  return ctx2} else {
91
- return and__23759__auto__3};
91
+ return and__132415__auto__3};
92
92
 
93
93
  })())) {
94
94
  return `${vars1??''}${" "}${ctx2??''}`} else {
@@ -107,12 +107,12 @@ const line3 = squint_core.get(map__12, "line");
107
107
  const column4 = squint_core.get(map__12, "column");
108
108
  const file5 = squint_core.get(map__12, "file");
109
109
  if (squint_core.truth_((() => {
110
- const or__23719__auto__6 = line3;
111
- if (squint_core.truth_(or__23719__auto__6)) {
112
- return or__23719__auto__6} else {
113
- const or__23719__auto__7 = column4;
114
- if (squint_core.truth_(or__23719__auto__7)) {
115
- return or__23719__auto__7} else {
110
+ const or__132408__auto__6 = line3;
111
+ if (squint_core.truth_(or__132408__auto__6)) {
112
+ return or__132408__auto__6} else {
113
+ const or__132408__auto__7 = column4;
114
+ if (squint_core.truth_(or__132408__auto__7)) {
115
+ return or__132408__auto__7} else {
116
116
  return file5};
117
117
  };
118
118
 
@@ -136,9 +136,9 @@ return inc_report_counter_BANG_("pass");
136
136
  squint_multi.defmethod(report, ["cljs.test/default", "fail"], (function (m) {
137
137
  inc_report_counter_BANG_("fail");
138
138
  console.error(`${"FAIL in "}${current_test_str()??''}${(() => {
139
- const temp__23371__auto__1 = report_loc(m);
140
- if (squint_core.truth_(temp__23371__auto__1)) {
141
- const l2 = temp__23371__auto__1;
139
+ const temp__132336__auto__1 = report_loc(m);
140
+ if (squint_core.truth_(temp__132336__auto__1)) {
141
+ const l2 = temp__132336__auto__1;
142
142
  return `${" ("}${l2??''}${")"}`;
143
143
  };
144
144
 
@@ -152,9 +152,9 @@ return console.error(" actual:", squint_core.pr_str(squint_core.get(m, "actua
152
152
  squint_multi.defmethod(report, ["cljs.test/default", "error"], (function (m) {
153
153
  inc_report_counter_BANG_("error");
154
154
  console.error(`${"ERROR in "}${current_test_str()??''}${(() => {
155
- const temp__23371__auto__1 = report_loc(m);
156
- if (squint_core.truth_(temp__23371__auto__1)) {
157
- const l2 = temp__23371__auto__1;
155
+ const temp__132336__auto__1 = report_loc(m);
156
+ if (squint_core.truth_(temp__132336__auto__1)) {
157
+ const l2 = temp__132336__auto__1;
158
158
  return `${" ("}${l2??''}${")"}`;
159
159
  };
160
160
 
@@ -197,10 +197,10 @@ return ((squint_core.get(results, "fail", 0) === 0) && (squint_core.get(results,
197
197
 
198
198
  };
199
199
  var async_QMARK_ = function (x) {
200
- const c__23690__auto__1 = Promise;
201
- const x__23691__auto__2 = x;
202
- const ret__23692__auto__3 = (x__23691__auto__2 instanceof c__23690__auto__1);
203
- return ret__23692__auto__3;
200
+ const c__132398__auto__1 = Promise;
201
+ const x__132399__auto__2 = x;
202
+ const ret__132400__auto__3 = (x__132399__auto__2 instanceof c__132398__auto__1);
203
+ return ret__132400__auto__3;
204
204
 
205
205
  };
206
206
  var wrap_async = function (setup, teardown) {
@@ -344,9 +344,9 @@ return f20;
344
344
  var test_var = function (v) {
345
345
  if (squint_core.truth_(squint_core.fn_QMARK_(v))) {
346
346
  const test_name1 = (() => {
347
- const or__23719__auto__2 = squint_core.get(squint_core.meta(v), "name");
348
- if (squint_core.truth_(or__23719__auto__2)) {
349
- return or__23719__auto__2} else {
347
+ const or__132408__auto__2 = squint_core.get(squint_core.meta(v), "name");
348
+ if (squint_core.truth_(or__132408__auto__2)) {
349
+ return or__132408__auto__2} else {
350
350
  return "anonymous"};
351
351
 
352
352
  })();
@@ -469,10 +469,10 @@ var fresh_counters = ({"test": 0, "pass": 0, "fail": 0, "error": 0});
469
469
  var run_tests = (() => {
470
470
  const f26 = (function (var_args) {
471
471
  const args271 = [];
472
- const len__23467__auto__2 = arguments.length;
472
+ const len__29152__auto__2 = arguments.length;
473
473
  let i283 = 0;
474
474
  while(true){
475
- if ((i283 < len__23467__auto__2)) {
475
+ if ((i283 < len__29152__auto__2)) {
476
476
  args271.push((arguments[i283]));
477
477
  let G__4 = (i283 + 1);
478
478
  i283 = G__4;
@@ -480,13 +480,13 @@ continue;
480
480
  };break;
481
481
  }
482
482
  ;
483
- const argseq__23695__auto__5 = (((0 < args271.length)) ? (args271.slice(0)) : (null));
484
- return f26.cljs$core$IFn$_invoke$arity$variadic(argseq__23695__auto__5);
483
+ const argseq__29378__auto__5 = (((0 < args271.length)) ? (args271.slice(0)) : (null));
484
+ return f26.cljs$core$IFn$_invoke$arity$variadic(argseq__29378__auto__5);
485
485
 
486
486
  });
487
487
  f26.cljs$core$IFn$_invoke$arity$variadic = (function (args) {
488
488
  const test_vars6 = ((squint_core.truth_(squint_core.empty_QMARK_(args))) ? (registered_tests()) : (((squint_core.truth_(squint_core.string_QMARK_(squint_core.first(args)))) ? (squint_core.vec(squint_core.mapcat(registered_tests, args))) : ((("else") ? (args) : (null))))));
489
- const _7 = (((_STAR_current_env_STAR_ == null)) ? (set_env_BANG_(empty_env())) : (null));
489
+ const _7 = (((_STAR_current_env_STAR_.val == null)) ? (set_env_BANG_(empty_env())) : (null));
490
490
  const saved_counters8 = squint_core.get(get_current_env(), "report-counters");
491
491
  const _9 = update_current_env_BANG_(["report-counters"], squint_core.constantly(fresh_counters));
492
492
  const groups10 = squint_core.reduce((function (acc, v) {