squint-cljs 0.14.196 → 0.14.198
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.
- package/lib/cli.js +108 -108
- package/lib/cljs.pprint.js +252 -252
- package/lib/compiler.js +1314 -1320
- package/lib/compiler.node.js +40 -40
- package/lib/compiler.sci.js +1277 -1276
- package/lib/node.nrepl_server.js +29 -29
- package/lib/squint.core.umd.js +3 -3
- package/package.json +1 -1
- package/src/squint/core.js +340 -73
- package/src/squint/string.js +4 -0
- package/src/squint/test.js +166 -197
package/src/squint/string.js
CHANGED
|
@@ -124,6 +124,10 @@ export function replace(s, match, replacement) {
|
|
|
124
124
|
throw `Invalid match arg: $match`;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
export function replace_first(s, match, replacement) {
|
|
128
|
+
return s.replace(match, replacement);
|
|
129
|
+
}
|
|
130
|
+
|
|
127
131
|
export function split_lines(s) {
|
|
128
132
|
return split(s, /\n|\r\n/);
|
|
129
133
|
}
|
package/src/squint/test.js
CHANGED
|
@@ -4,9 +4,9 @@ import * as clojure_DOT_string from 'squint-cljs/src/squint/string.js';
|
|
|
4
4
|
var _STAR_current_env_STAR_ = ({val: null});
|
|
5
5
|
var _STAR_current_reporter_STAR_ = ({val: "cljs.test/default"});
|
|
6
6
|
var current_reporter = function () {
|
|
7
|
-
const
|
|
8
|
-
if (squint_core.truth_(
|
|
9
|
-
return
|
|
7
|
+
const or__23653__auto__1 = _STAR_current_reporter_STAR_.val;
|
|
8
|
+
if (squint_core.truth_(or__23653__auto__1)) {
|
|
9
|
+
return or__23653__auto__1} else {
|
|
10
10
|
return "cljs.test/default"};
|
|
11
11
|
|
|
12
12
|
};
|
|
@@ -15,9 +15,9 @@ 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
|
|
19
|
-
if (squint_core.truth_(
|
|
20
|
-
return
|
|
18
|
+
const or__23653__auto__1 = _STAR_current_env_STAR_.val;
|
|
19
|
+
if (squint_core.truth_(or__23653__auto__1)) {
|
|
20
|
+
return or__23653__auto__1} else {
|
|
21
21
|
return empty_env()};
|
|
22
22
|
|
|
23
23
|
};
|
|
@@ -31,46 +31,33 @@ _STAR_current_env_STAR_.val = null;
|
|
|
31
31
|
return null;
|
|
32
32
|
|
|
33
33
|
};
|
|
34
|
-
var update_current_env_BANG_ = (() => {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
while(true){
|
|
40
|
-
if ((i33 < len__29152__auto__2)) {
|
|
41
|
-
args21.push((arguments[i33]));
|
|
42
|
-
let G__4 = (i33 + 1);
|
|
43
|
-
i33 = G__4;
|
|
44
|
-
continue;
|
|
45
|
-
};break;
|
|
46
|
-
}
|
|
47
|
-
;
|
|
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);
|
|
34
|
+
var update_current_env_BANG_ = /* @__PURE__ */ (() => {
|
|
35
|
+
const impl51 = (function (ks, f, args) {
|
|
36
|
+
const env2 = get_current_env();
|
|
37
|
+
const new_env3 = squint_core.apply(squint_core.update_in, env2, ks, f, args);
|
|
38
|
+
return set_env_BANG_(new_env3);
|
|
50
39
|
|
|
51
40
|
});
|
|
52
|
-
f1
|
|
53
|
-
|
|
54
|
-
const new_env7 = squint_core.apply(squint_core.update_in, env6, ks, f, args);
|
|
55
|
-
return set_env_BANG_(new_env7);
|
|
41
|
+
const f1 = (function (arg2, arg3, ...rest4) {
|
|
42
|
+
return impl51(arg2, arg3, (((rest4.length === 0)) ? (null) : (rest4)));
|
|
56
43
|
|
|
57
44
|
});
|
|
58
|
-
f1
|
|
45
|
+
(f1["squint$lang$variadic"] = impl51);
|
|
59
46
|
return f1;
|
|
60
47
|
|
|
61
48
|
})();
|
|
62
49
|
var testing_contexts_str = function () {
|
|
63
|
-
const
|
|
64
|
-
if (squint_core.truth_(
|
|
65
|
-
const contexts2 =
|
|
50
|
+
const temp__23234__auto__1 = squint_core.seq(squint_core.get(get_current_env(), "testing-contexts"));
|
|
51
|
+
if (squint_core.truth_(temp__23234__auto__1)) {
|
|
52
|
+
const contexts2 = temp__23234__auto__1;
|
|
66
53
|
return clojure_DOT_string.join(" ", squint_core.reverse(contexts2));
|
|
67
54
|
};
|
|
68
55
|
|
|
69
56
|
};
|
|
70
57
|
var testing_vars_str = function () {
|
|
71
|
-
const
|
|
72
|
-
if (squint_core.truth_(
|
|
73
|
-
const vars2 =
|
|
58
|
+
const temp__23234__auto__1 = squint_core.seq(squint_core.get(get_current_env(), "testing-vars"));
|
|
59
|
+
if (squint_core.truth_(temp__23234__auto__1)) {
|
|
60
|
+
const vars2 = temp__23234__auto__1;
|
|
74
61
|
return clojure_DOT_string.join(" ", squint_core.map(squint_core.str, vars2));
|
|
75
62
|
};
|
|
76
63
|
|
|
@@ -85,10 +72,10 @@ var current_test_str = function () {
|
|
|
85
72
|
const vars1 = testing_vars_str();
|
|
86
73
|
const ctx2 = testing_contexts_str();
|
|
87
74
|
if (squint_core.truth_((() => {
|
|
88
|
-
const
|
|
89
|
-
if (squint_core.truth_(
|
|
75
|
+
const and__23692__auto__3 = vars1;
|
|
76
|
+
if (squint_core.truth_(and__23692__auto__3)) {
|
|
90
77
|
return ctx2} else {
|
|
91
|
-
return
|
|
78
|
+
return and__23692__auto__3};
|
|
92
79
|
|
|
93
80
|
})())) {
|
|
94
81
|
return `${vars1??''}${" "}${ctx2??''}`} else {
|
|
@@ -101,18 +88,18 @@ return "test"} else {
|
|
|
101
88
|
return null}}}};
|
|
102
89
|
|
|
103
90
|
};
|
|
104
|
-
var report_loc = function (
|
|
105
|
-
const map__12 =
|
|
91
|
+
var report_loc = function (p__6) {
|
|
92
|
+
const map__12 = p__6;
|
|
106
93
|
const line3 = squint_core.get(map__12, "line");
|
|
107
94
|
const column4 = squint_core.get(map__12, "column");
|
|
108
95
|
const file5 = squint_core.get(map__12, "file");
|
|
109
96
|
if (squint_core.truth_((() => {
|
|
110
|
-
const
|
|
111
|
-
if (squint_core.truth_(
|
|
112
|
-
return
|
|
113
|
-
const
|
|
114
|
-
if (squint_core.truth_(
|
|
115
|
-
return
|
|
97
|
+
const or__23653__auto__6 = line3;
|
|
98
|
+
if (squint_core.truth_(or__23653__auto__6)) {
|
|
99
|
+
return or__23653__auto__6} else {
|
|
100
|
+
const or__23653__auto__7 = column4;
|
|
101
|
+
if (squint_core.truth_(or__23653__auto__7)) {
|
|
102
|
+
return or__23653__auto__7} else {
|
|
116
103
|
return file5};
|
|
117
104
|
};
|
|
118
105
|
|
|
@@ -135,39 +122,39 @@ return inc_report_counter_BANG_("pass");
|
|
|
135
122
|
}));
|
|
136
123
|
squint_multi.defmethod(report, ["cljs.test/default", "fail"], (function (m) {
|
|
137
124
|
inc_report_counter_BANG_("fail");
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
if (squint_core.truth_(
|
|
141
|
-
const l2 =
|
|
125
|
+
squint_core.println(`${"FAIL in "}${current_test_str()??''}${(() => {
|
|
126
|
+
const temp__23234__auto__1 = report_loc(m);
|
|
127
|
+
if (squint_core.truth_(temp__23234__auto__1)) {
|
|
128
|
+
const l2 = temp__23234__auto__1;
|
|
142
129
|
return `${" ("}${l2??''}${")"}`;
|
|
143
130
|
};
|
|
144
131
|
|
|
145
132
|
})()??''}`);
|
|
146
133
|
if (squint_core.truth_(squint_core.get(m, "message"))) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return
|
|
134
|
+
squint_core.println(" ", squint_core.get(m, "message"))};
|
|
135
|
+
squint_core.println(" expected:", squint_core.pr_str(squint_core.get(m, "expected")));
|
|
136
|
+
return squint_core.println(" actual:", squint_core.pr_str(squint_core.get(m, "actual")));
|
|
150
137
|
|
|
151
138
|
}));
|
|
152
139
|
squint_multi.defmethod(report, ["cljs.test/default", "error"], (function (m) {
|
|
153
140
|
inc_report_counter_BANG_("error");
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
if (squint_core.truth_(
|
|
157
|
-
const l2 =
|
|
141
|
+
squint_core.println(`${"ERROR in "}${current_test_str()??''}${(() => {
|
|
142
|
+
const temp__23234__auto__1 = report_loc(m);
|
|
143
|
+
if (squint_core.truth_(temp__23234__auto__1)) {
|
|
144
|
+
const l2 = temp__23234__auto__1;
|
|
158
145
|
return `${" ("}${l2??''}${")"}`;
|
|
159
146
|
};
|
|
160
147
|
|
|
161
148
|
})()??''}`);
|
|
162
149
|
if (squint_core.truth_(squint_core.get(m, "message"))) {
|
|
163
|
-
|
|
150
|
+
squint_core.println(" ", squint_core.get(m, "message"))};
|
|
164
151
|
if (squint_core.truth_(squint_core.get(m, "expected"))) {
|
|
165
|
-
|
|
166
|
-
return
|
|
152
|
+
squint_core.println(" expected:", squint_core.pr_str(squint_core.get(m, "expected")))};
|
|
153
|
+
return squint_core.println(" actual:", squint_core.pr_str(squint_core.get(m, "actual")));
|
|
167
154
|
|
|
168
155
|
}));
|
|
169
156
|
squint_multi.defmethod(report, ["cljs.test/default", "begin-test-ns"], (function (m) {
|
|
170
|
-
return
|
|
157
|
+
return squint_core.println("\nTesting", `${squint_core.get(m, "ns")??''}`);
|
|
171
158
|
|
|
172
159
|
}));
|
|
173
160
|
squint_multi.defmethod(report, ["cljs.test/default", "end-test-ns"], (function (_) {
|
|
@@ -183,13 +170,13 @@ return null;
|
|
|
183
170
|
|
|
184
171
|
}));
|
|
185
172
|
squint_multi.defmethod(report, ["cljs.test/default", "summary"], (function (_) {
|
|
186
|
-
let
|
|
187
|
-
let
|
|
188
|
-
let
|
|
189
|
-
let
|
|
190
|
-
let
|
|
191
|
-
|
|
192
|
-
return
|
|
173
|
+
let map__17 = squint_core.get(get_current_env(), "report-counters");
|
|
174
|
+
let test8 = squint_core.get(map__17, "test");
|
|
175
|
+
let pass9 = squint_core.get(map__17, "pass");
|
|
176
|
+
let fail10 = squint_core.get(map__17, "fail");
|
|
177
|
+
let error11 = squint_core.get(map__17, "error");
|
|
178
|
+
squint_core.println("\nRan", test8, "tests containing", (pass9 + fail10 + error11), "assertions.");
|
|
179
|
+
return squint_core.println(`${fail10??''}`, "failures,", `${error11??''}`, "errors.");
|
|
193
180
|
|
|
194
181
|
}));
|
|
195
182
|
var successful_QMARK_ = function (results) {
|
|
@@ -197,10 +184,10 @@ return ((squint_core.get(results, "fail", 0) === 0) && (squint_core.get(results,
|
|
|
197
184
|
|
|
198
185
|
};
|
|
199
186
|
var async_QMARK_ = function (x) {
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
return
|
|
187
|
+
const c__23598__auto__1 = Promise;
|
|
188
|
+
const x__23599__auto__2 = x;
|
|
189
|
+
const ret__23600__auto__3 = (x__23599__auto__2 instanceof c__23598__auto__1);
|
|
190
|
+
return ret__23600__auto__3;
|
|
204
191
|
|
|
205
192
|
};
|
|
206
193
|
var wrap_async = function (setup, teardown) {
|
|
@@ -233,120 +220,116 @@ return f();
|
|
|
233
220
|
}), fixtures);
|
|
234
221
|
|
|
235
222
|
};
|
|
236
|
-
var get_each_fixtures = (() => {
|
|
237
|
-
const
|
|
238
|
-
const G__131 = args12.length;
|
|
239
|
-
switch (G__131) {case 0:
|
|
240
|
-
return f11.cljs$core$IFn$_invoke$arity$0();
|
|
241
|
-
|
|
242
|
-
break;
|
|
243
|
-
case 1:
|
|
244
|
-
return f11.cljs$core$IFn$_invoke$arity$1(args12[0]);
|
|
245
|
-
|
|
246
|
-
break;
|
|
247
|
-
default:
|
|
248
|
-
throw (new Error(`${"Invalid arity: "}${args12.length??''}`))};
|
|
249
|
-
|
|
250
|
-
});
|
|
251
|
-
f11.cljs$core$IFn$_invoke$arity$0 = (function () {
|
|
223
|
+
var get_each_fixtures = /* @__PURE__ */ (() => {
|
|
224
|
+
const impl151 = (function () {
|
|
252
225
|
return get_each_fixtures(null);
|
|
253
226
|
|
|
254
227
|
});
|
|
255
|
-
|
|
228
|
+
const impl162 = (function (ns_str) {
|
|
256
229
|
return squint_core.get_in(get_current_env(), ["each-fixtures", ns_str], []);
|
|
257
230
|
|
|
258
231
|
});
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
var set_each_fixtures_BANG_ = (() => {
|
|
264
|
-
const f14 = (function (...args15) {
|
|
265
|
-
const G__161 = args15.length;
|
|
266
|
-
switch (G__161) {case 1:
|
|
267
|
-
return f14.cljs$core$IFn$_invoke$arity$1(args15[0]);
|
|
232
|
+
const f12 = (function (...args13) {
|
|
233
|
+
const G__173 = args13.length;
|
|
234
|
+
switch (G__173) {case 0:
|
|
235
|
+
return impl151();
|
|
268
236
|
|
|
269
237
|
break;
|
|
270
|
-
case
|
|
271
|
-
return
|
|
238
|
+
case 1:
|
|
239
|
+
return impl162(args13[0]);
|
|
272
240
|
|
|
273
241
|
break;
|
|
274
242
|
default:
|
|
275
|
-
throw (new Error(`${"Invalid arity: "}${
|
|
243
|
+
throw (new Error(`${"Invalid arity: "}${args13.length??''}`))};
|
|
276
244
|
|
|
277
245
|
});
|
|
278
|
-
|
|
246
|
+
return f12;
|
|
247
|
+
|
|
248
|
+
})();
|
|
249
|
+
var set_each_fixtures_BANG_ = /* @__PURE__ */ (() => {
|
|
250
|
+
const impl211 = (function (fixtures) {
|
|
279
251
|
return set_each_fixtures_BANG_(null, fixtures);
|
|
280
252
|
|
|
281
253
|
});
|
|
282
|
-
|
|
254
|
+
const impl222 = (function (ns_str, fixtures) {
|
|
283
255
|
return update_current_env_BANG_(["each-fixtures", ns_str], squint_core.constantly(fixtures));
|
|
284
256
|
|
|
285
257
|
});
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
var get_once_fixtures = (() => {
|
|
291
|
-
const f17 = (function (...args18) {
|
|
292
|
-
const G__191 = args18.length;
|
|
293
|
-
switch (G__191) {case 0:
|
|
294
|
-
return f17.cljs$core$IFn$_invoke$arity$0();
|
|
258
|
+
const f18 = (function (...args19) {
|
|
259
|
+
const G__233 = args19.length;
|
|
260
|
+
switch (G__233) {case 1:
|
|
261
|
+
return impl211(args19[0]);
|
|
295
262
|
|
|
296
263
|
break;
|
|
297
|
-
case
|
|
298
|
-
return
|
|
264
|
+
case 2:
|
|
265
|
+
return impl222(args19[0], args19[1]);
|
|
299
266
|
|
|
300
267
|
break;
|
|
301
268
|
default:
|
|
302
|
-
throw (new Error(`${"Invalid arity: "}${
|
|
269
|
+
throw (new Error(`${"Invalid arity: "}${args19.length??''}`))};
|
|
303
270
|
|
|
304
271
|
});
|
|
305
|
-
|
|
272
|
+
return f18;
|
|
273
|
+
|
|
274
|
+
})();
|
|
275
|
+
var get_once_fixtures = /* @__PURE__ */ (() => {
|
|
276
|
+
const impl271 = (function () {
|
|
306
277
|
return get_once_fixtures(null);
|
|
307
278
|
|
|
308
279
|
});
|
|
309
|
-
|
|
280
|
+
const impl282 = (function (ns_str) {
|
|
310
281
|
return squint_core.get_in(get_current_env(), ["once-fixtures", ns_str], []);
|
|
311
282
|
|
|
312
283
|
});
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
var set_once_fixtures_BANG_ = (() => {
|
|
318
|
-
const f20 = (function (...args21) {
|
|
319
|
-
const G__221 = args21.length;
|
|
320
|
-
switch (G__221) {case 1:
|
|
321
|
-
return f20.cljs$core$IFn$_invoke$arity$1(args21[0]);
|
|
284
|
+
const f24 = (function (...args25) {
|
|
285
|
+
const G__293 = args25.length;
|
|
286
|
+
switch (G__293) {case 0:
|
|
287
|
+
return impl271();
|
|
322
288
|
|
|
323
289
|
break;
|
|
324
|
-
case
|
|
325
|
-
return
|
|
290
|
+
case 1:
|
|
291
|
+
return impl282(args25[0]);
|
|
326
292
|
|
|
327
293
|
break;
|
|
328
294
|
default:
|
|
329
|
-
throw (new Error(`${"Invalid arity: "}${
|
|
295
|
+
throw (new Error(`${"Invalid arity: "}${args25.length??''}`))};
|
|
330
296
|
|
|
331
297
|
});
|
|
332
|
-
|
|
298
|
+
return f24;
|
|
299
|
+
|
|
300
|
+
})();
|
|
301
|
+
var set_once_fixtures_BANG_ = /* @__PURE__ */ (() => {
|
|
302
|
+
const impl331 = (function (fixtures) {
|
|
333
303
|
return set_once_fixtures_BANG_(null, fixtures);
|
|
334
304
|
|
|
335
305
|
});
|
|
336
|
-
|
|
306
|
+
const impl342 = (function (ns_str, fixtures) {
|
|
337
307
|
return update_current_env_BANG_(["once-fixtures", ns_str], squint_core.constantly(fixtures));
|
|
338
308
|
|
|
339
309
|
});
|
|
340
|
-
|
|
341
|
-
|
|
310
|
+
const f30 = (function (...args31) {
|
|
311
|
+
const G__353 = args31.length;
|
|
312
|
+
switch (G__353) {case 1:
|
|
313
|
+
return impl331(args31[0]);
|
|
314
|
+
|
|
315
|
+
break;
|
|
316
|
+
case 2:
|
|
317
|
+
return impl342(args31[0], args31[1]);
|
|
318
|
+
|
|
319
|
+
break;
|
|
320
|
+
default:
|
|
321
|
+
throw (new Error(`${"Invalid arity: "}${args31.length??''}`))};
|
|
322
|
+
|
|
323
|
+
});
|
|
324
|
+
return f30;
|
|
342
325
|
|
|
343
326
|
})();
|
|
344
327
|
var test_var = function (v) {
|
|
345
328
|
if (squint_core.truth_(squint_core.fn_QMARK_(v))) {
|
|
346
329
|
const test_name1 = (() => {
|
|
347
|
-
const
|
|
348
|
-
if (squint_core.truth_(
|
|
349
|
-
return
|
|
330
|
+
const or__23653__auto__2 = squint_core.get(squint_core.meta(v), "name");
|
|
331
|
+
if (squint_core.truth_(or__23653__auto__2)) {
|
|
332
|
+
return or__23653__auto__2} else {
|
|
350
333
|
return "anonymous"};
|
|
351
334
|
|
|
352
335
|
})();
|
|
@@ -403,31 +386,30 @@ squint_core.swap_BANG_(test_registry, squint_core.assoc_in, [ns_str, test_name1]
|
|
|
403
386
|
return test_fn;
|
|
404
387
|
|
|
405
388
|
};
|
|
406
|
-
var registered_tests = (() => {
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
389
|
+
var registered_tests = /* @__PURE__ */ (() => {
|
|
390
|
+
const impl391 = (function () {
|
|
391
|
+
return squint_core.vec(squint_core.mapcat(squint_core.vals, squint_core.vals(squint_core.deref(test_registry))));
|
|
392
|
+
|
|
393
|
+
});
|
|
394
|
+
const impl402 = (function (ns_str) {
|
|
395
|
+
return squint_core.vec(squint_core.vals(squint_core.get(squint_core.deref(test_registry), ns_str)));
|
|
396
|
+
|
|
397
|
+
});
|
|
398
|
+
const f36 = (function (...args37) {
|
|
399
|
+
const G__413 = args37.length;
|
|
400
|
+
switch (G__413) {case 0:
|
|
401
|
+
return impl391();
|
|
411
402
|
|
|
412
403
|
break;
|
|
413
404
|
case 1:
|
|
414
|
-
return
|
|
405
|
+
return impl402(args37[0]);
|
|
415
406
|
|
|
416
407
|
break;
|
|
417
408
|
default:
|
|
418
|
-
throw (new Error(`${"Invalid arity: "}${
|
|
409
|
+
throw (new Error(`${"Invalid arity: "}${args37.length??''}`))};
|
|
419
410
|
|
|
420
411
|
});
|
|
421
|
-
|
|
422
|
-
return squint_core.vec(squint_core.mapcat(squint_core.vals, squint_core.vals(squint_core.deref(test_registry))));
|
|
423
|
-
|
|
424
|
-
});
|
|
425
|
-
f23.cljs$core$IFn$_invoke$arity$1 = (function (ns_str) {
|
|
426
|
-
return squint_core.vec(squint_core.vals(squint_core.get(squint_core.deref(test_registry), ns_str)));
|
|
427
|
-
|
|
428
|
-
});
|
|
429
|
-
f23.cljs$lang$maxFixedArity = 1;
|
|
430
|
-
return f23;
|
|
412
|
+
return f36;
|
|
431
413
|
|
|
432
414
|
})();
|
|
433
415
|
var run_vars_with_once_fixtures = function (ns_str, vars) {
|
|
@@ -466,64 +448,51 @@ return finish6(chain5)};
|
|
|
466
448
|
|
|
467
449
|
};
|
|
468
450
|
var fresh_counters = ({"test": 0, "pass": 0, "fail": 0, "error": 0});
|
|
469
|
-
var run_tests = (() => {
|
|
470
|
-
const
|
|
471
|
-
const
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
;
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
});
|
|
487
|
-
f26.cljs$core$IFn$_invoke$arity$variadic = (function (args) {
|
|
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_.val == null)) ? (set_env_BANG_(empty_env())) : (null));
|
|
490
|
-
const saved_counters8 = squint_core.get(get_current_env(), "report-counters");
|
|
491
|
-
const _9 = update_current_env_BANG_(["report-counters"], squint_core.constantly(fresh_counters));
|
|
492
|
-
const groups10 = squint_core.reduce((function (acc, v) {
|
|
493
|
-
const k11 = squint_core.get(squint_core.meta(v), "ns");
|
|
494
|
-
return squint_core.update(acc, k11, squint_core.fnil(squint_core.conj, []), v);
|
|
495
|
-
|
|
496
|
-
}), ({}), test_vars6);
|
|
497
|
-
const run_groups12 = (function () {
|
|
498
|
-
return squint_core.reduce((function (chain, p__30) {
|
|
499
|
-
const vec__1316 = p__30;
|
|
500
|
-
const ns_str17 = squint_core.nth(vec__1316, 0, null);
|
|
501
|
-
const vars18 = squint_core.nth(vec__1316, 1, null);
|
|
451
|
+
var run_tests = /* @__PURE__ */ (() => {
|
|
452
|
+
const impl441 = (function (args) {
|
|
453
|
+
const test_vars2 = ((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))))));
|
|
454
|
+
const _3 = (((_STAR_current_env_STAR_.val == null)) ? (set_env_BANG_(empty_env())) : (null));
|
|
455
|
+
const saved_counters4 = squint_core.get(get_current_env(), "report-counters");
|
|
456
|
+
const _5 = update_current_env_BANG_(["report-counters"], squint_core.constantly(fresh_counters));
|
|
457
|
+
const groups6 = squint_core.reduce((function (acc, v) {
|
|
458
|
+
const k7 = squint_core.get(squint_core.meta(v), "ns");
|
|
459
|
+
return squint_core.update(acc, k7, squint_core.fnil(squint_core.conj, []), v);
|
|
460
|
+
|
|
461
|
+
}), ({}), test_vars2);
|
|
462
|
+
const run_groups8 = (function () {
|
|
463
|
+
return squint_core.reduce((function (chain, p__45) {
|
|
464
|
+
const vec__912 = p__45;
|
|
465
|
+
const ns_str13 = squint_core.nth(vec__912, 0, null);
|
|
466
|
+
const vars14 = squint_core.nth(vec__912, 1, null);
|
|
502
467
|
if (squint_core.truth_(async_QMARK_(chain))) {
|
|
503
468
|
return chain.then((function (_) {
|
|
504
|
-
return run_vars_with_once_fixtures(
|
|
469
|
+
return run_vars_with_once_fixtures(ns_str13, vars14);
|
|
505
470
|
|
|
506
471
|
}))} else {
|
|
507
|
-
return run_vars_with_once_fixtures(
|
|
472
|
+
return run_vars_with_once_fixtures(ns_str13, vars14)};
|
|
508
473
|
|
|
509
|
-
}), null,
|
|
474
|
+
}), null, groups6);
|
|
510
475
|
|
|
511
476
|
});
|
|
512
|
-
const
|
|
477
|
+
const finish15 = (function (_) {
|
|
513
478
|
report(({"type": "summary"}));
|
|
514
|
-
const
|
|
515
|
-
update_current_env_BANG_(["report-counters"], squint_core.constantly(
|
|
516
|
-
return
|
|
479
|
+
const counters16 = squint_core.get(get_current_env(), "report-counters");
|
|
480
|
+
update_current_env_BANG_(["report-counters"], squint_core.constantly(saved_counters4));
|
|
481
|
+
return counters16;
|
|
482
|
+
|
|
483
|
+
});
|
|
484
|
+
const chain17 = run_groups8();
|
|
485
|
+
if (squint_core.truth_(async_QMARK_(chain17))) {
|
|
486
|
+
return chain17.then(finish15)} else {
|
|
487
|
+
return finish15(null)};
|
|
517
488
|
|
|
518
489
|
});
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
return chain21.then(finish19)} else {
|
|
522
|
-
return finish19(null)};
|
|
490
|
+
const f42 = (function (...rest43) {
|
|
491
|
+
return impl441((((rest43.length === 0)) ? (null) : (rest43)));
|
|
523
492
|
|
|
524
493
|
});
|
|
525
|
-
|
|
526
|
-
return
|
|
494
|
+
(f42["squint$lang$variadic"] = impl441);
|
|
495
|
+
return f42;
|
|
527
496
|
|
|
528
497
|
})();
|
|
529
498
|
|