@granito/vitest-marbles 1.0.0-dev.3 → 1.0.0-dev.5
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/README.md +3 -2
- package/index.d.ts +1 -2
- package/index.js +170 -20
- package/lib/assert-deep-equal.d.ts +4 -0
- package/lib/internal-matchers.d.ts +13 -0
- package/lib/marbles.d.ts +3 -18
- package/lib/marblizer.d.ts +2 -10
- package/lib/matchers.d.ts +13 -0
- package/lib/scheduler.d.ts +7 -0
- package/lib/{rxjs/types.d.ts → types.d.ts} +3 -1
- package/package.json +4 -6
- package/index.d.ts.map +0 -1
- package/lib/marbles-glossary.d.ts +0 -10
- package/lib/marbles-glossary.d.ts.map +0 -1
- package/lib/marbles.d.ts.map +0 -1
- package/lib/marblizer.d.ts.map +0 -1
- package/lib/notification-event.d.ts +0 -7
- package/lib/notification-event.d.ts.map +0 -1
- package/lib/notification-kind.d.ts +0 -8
- package/lib/notification-kind.d.ts.map +0 -1
- package/lib/rxjs/assert-deep-equal.d.ts +0 -5
- package/lib/rxjs/assert-deep-equal.d.ts.map +0 -1
- package/lib/rxjs/cold-observable.d.ts +0 -12
- package/lib/rxjs/cold-observable.d.ts.map +0 -1
- package/lib/rxjs/hot-observable.d.ts +0 -12
- package/lib/rxjs/hot-observable.d.ts.map +0 -1
- package/lib/rxjs/scheduler.d.ts +0 -11
- package/lib/rxjs/scheduler.d.ts.map +0 -1
- package/lib/rxjs/strip-alignment-chars.d.ts +0 -2
- package/lib/rxjs/strip-alignment-chars.d.ts.map +0 -1
- package/lib/rxjs/types.d.ts.map +0 -1
- package/lib/vitest/custom-matchers.d.ts +0 -14
- package/lib/vitest/custom-matchers.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ clean way.
|
|
|
12
12
|
# Features
|
|
13
13
|
|
|
14
14
|
* Typescript;
|
|
15
|
-
*
|
|
15
|
+
* easy to read error messages for subscriptions.
|
|
16
16
|
|
|
17
17
|
# Prerequisites
|
|
18
18
|
|
|
@@ -23,7 +23,8 @@ clean way.
|
|
|
23
23
|
|
|
24
24
|
# Not supported
|
|
25
25
|
|
|
26
|
-
* time progression syntax
|
|
26
|
+
* time progression syntax;
|
|
27
|
+
* `.not` syntax.
|
|
27
28
|
|
|
28
29
|
# Usage
|
|
29
30
|
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,37 +1,187 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/scheduler.ts
|
|
2
|
+
import { TestScheduler } from "rxjs/testing";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
// src/lib/marblizer.ts
|
|
5
|
+
var frameStep = 10;
|
|
6
|
+
function marblize(logs) {
|
|
7
|
+
return logs.map(
|
|
8
|
+
(log) => marblizeLogEntry(log.subscribedFrame / frameStep, "^" /* Subscription */) + marblizeLogEntry(
|
|
9
|
+
(log.unsubscribedFrame - log.subscribedFrame) / frameStep - 1,
|
|
10
|
+
"!" /* Unsubscription */
|
|
11
|
+
)
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
function marblizeLogEntry(logPoint, symbol) {
|
|
15
|
+
return logPoint !== Infinity ? "-" /* TimeFrame */.repeat(logPoint) + symbol : "";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/lib/internal-matchers.ts
|
|
19
|
+
var internalMatchers = {
|
|
20
|
+
toBeNotifications(actual, expected) {
|
|
21
|
+
let message = "";
|
|
22
|
+
const pass = this.equals(actual, expected);
|
|
23
|
+
if (!pass) {
|
|
24
|
+
const diff = this.utils.diff(expected, actual, { expand: true });
|
|
25
|
+
message = this.utils.matcherHint(".toBeNotifications") + `
|
|
7
26
|
|
|
8
27
|
Expected notifications to be:
|
|
9
|
-
${this.utils.printExpected(
|
|
28
|
+
${this.utils.printExpected(expected)}
|
|
10
29
|
But got:
|
|
11
|
-
${this.utils.printReceived(
|
|
30
|
+
${this.utils.printReceived(actual)}
|
|
12
31
|
|
|
13
32
|
Difference:
|
|
14
33
|
|
|
15
|
-
${
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
${diff}`;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
pass,
|
|
38
|
+
message: () => message
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
toBeSubscriptions(actualSubs, expectedSubs) {
|
|
42
|
+
const actual = marblize(actualSubs);
|
|
43
|
+
const expected = marblize(expectedSubs);
|
|
44
|
+
const pass = subscriptionsPass(actual, expected);
|
|
45
|
+
let message = "";
|
|
46
|
+
if (!pass) {
|
|
47
|
+
const diff = this.utils.diff(expected, actual, { expand: true });
|
|
48
|
+
message = this.utils.matcherHint(".toHaveSubscriptions") + `
|
|
21
49
|
|
|
22
50
|
Expected observable to have the following subscription points:
|
|
23
|
-
${this.utils.printExpected(
|
|
51
|
+
${this.utils.printExpected(expected)}
|
|
24
52
|
But got:
|
|
25
|
-
${this.utils.printReceived(
|
|
53
|
+
${this.utils.printReceived(actual)}
|
|
26
54
|
|
|
27
55
|
Difference:
|
|
28
56
|
|
|
29
|
-
${
|
|
30
|
-
|
|
31
|
-
|
|
57
|
+
${diff}`;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
pass,
|
|
61
|
+
message: () => message
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
toHaveEmptySubscriptions(actual) {
|
|
65
|
+
const pass = !(actual && actual.length > 0);
|
|
66
|
+
let message = "";
|
|
67
|
+
if (!pass)
|
|
68
|
+
message = this.utils.matcherHint(".toHaveNoSubscriptions") + `
|
|
32
69
|
|
|
33
70
|
Expected observable to have no subscription points
|
|
34
71
|
But got:
|
|
35
|
-
${this.utils.printReceived(
|
|
72
|
+
${this.utils.printReceived(marblize(actual))}
|
|
73
|
+
|
|
74
|
+
`;
|
|
75
|
+
return {
|
|
76
|
+
pass,
|
|
77
|
+
message: () => message
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
expect.extend(internalMatchers);
|
|
82
|
+
function subscriptionsPass(actualMarbleArray, expectedMarbleArray) {
|
|
83
|
+
if (actualMarbleArray.length !== expectedMarbleArray.length)
|
|
84
|
+
return false;
|
|
85
|
+
for (const actualMarble of actualMarbleArray)
|
|
86
|
+
if (!expectedMarbleArray.includes(actualMarble))
|
|
87
|
+
return false;
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/lib/assert-deep-equal.ts
|
|
92
|
+
function assertDeepEqual(actual, expected) {
|
|
93
|
+
if (!expected)
|
|
94
|
+
return;
|
|
95
|
+
if (actualIsSubscriptionsAndExpectedIsEmpty(actual, expected))
|
|
96
|
+
expect(actual).toHaveEmptySubscriptions();
|
|
97
|
+
else if (expectedIsSubscriptionLogArray(actual, expected))
|
|
98
|
+
expect(actual).toBeSubscriptions(expected);
|
|
99
|
+
else
|
|
100
|
+
expect(actual).toBeNotifications(expected);
|
|
101
|
+
}
|
|
102
|
+
function actualIsSubscriptionsAndExpectedIsEmpty(actual, expected) {
|
|
103
|
+
return expected.length === 0 && actual.length !== 0 && actual[0].subscribedFrame !== void 0;
|
|
104
|
+
}
|
|
105
|
+
function expectedIsSubscriptionLogArray(actual, expected) {
|
|
106
|
+
return actual.length === 0 && expected.length === 0 || expected.length !== 0 && expected[0].subscribedFrame !== void 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// src/lib/scheduler.ts
|
|
110
|
+
var Scheduler = class _Scheduler {
|
|
111
|
+
static instance;
|
|
112
|
+
static init() {
|
|
113
|
+
_Scheduler.instance = new TestScheduler(assertDeepEqual);
|
|
114
|
+
}
|
|
115
|
+
static get() {
|
|
116
|
+
if (!_Scheduler.instance)
|
|
117
|
+
throw new Error("Scheduler is not initialized");
|
|
118
|
+
return _Scheduler.instance;
|
|
119
|
+
}
|
|
120
|
+
static reset() {
|
|
121
|
+
_Scheduler.instance = null;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// src/lib/marbles.ts
|
|
126
|
+
function cold(marbles, values, error) {
|
|
127
|
+
return Scheduler.get().createColdObservable(marbles.trim(), values, error);
|
|
128
|
+
}
|
|
129
|
+
function hot(marbles, values, error) {
|
|
130
|
+
return Scheduler.get().createHotObservable(marbles.trim(), values, error);
|
|
131
|
+
}
|
|
132
|
+
function time(marbles) {
|
|
133
|
+
return Scheduler.get().createTime(marbles.trim());
|
|
134
|
+
}
|
|
135
|
+
function schedule(work, delay) {
|
|
136
|
+
return Scheduler.get().schedule(work, delay);
|
|
137
|
+
}
|
|
36
138
|
|
|
37
|
-
|
|
139
|
+
// src/lib/matchers.ts
|
|
140
|
+
import { TestScheduler as TestScheduler2 } from "rxjs/testing";
|
|
141
|
+
var success = {
|
|
142
|
+
pass: true,
|
|
143
|
+
message: () => ""
|
|
144
|
+
};
|
|
145
|
+
expect.extend({
|
|
146
|
+
toHaveSubscriptions(actual, marbles) {
|
|
147
|
+
const sanitizedMarbles = Array.isArray(marbles) ? marbles.map((m) => m.trim()) : marbles.trim();
|
|
148
|
+
Scheduler.get().expectSubscriptions(actual.subscriptions).toBe(sanitizedMarbles);
|
|
149
|
+
return success;
|
|
150
|
+
},
|
|
151
|
+
toHaveNoSubscriptions(actual) {
|
|
152
|
+
Scheduler.get().expectSubscriptions(actual.subscriptions).toBe([]);
|
|
153
|
+
return success;
|
|
154
|
+
},
|
|
155
|
+
toBeObservable(actual, expected, subscription) {
|
|
156
|
+
Scheduler.get().expectObservable(actual, subscription).toEqual(expected);
|
|
157
|
+
return success;
|
|
158
|
+
},
|
|
159
|
+
toBeMarble(actual, marbles, values, error) {
|
|
160
|
+
Scheduler.get().expectObservable(actual).toBe(marbles.trim(), values, error);
|
|
161
|
+
return success;
|
|
162
|
+
},
|
|
163
|
+
toSatisfyOnFlush(actual, func) {
|
|
164
|
+
Scheduler.get().expectObservable(actual);
|
|
165
|
+
const flushTests = Scheduler.get()["flushTests"];
|
|
166
|
+
flushTests[flushTests.length - 1].ready = true;
|
|
167
|
+
onFlush.push(func);
|
|
168
|
+
return success;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
var onFlush = [];
|
|
172
|
+
beforeEach(() => {
|
|
173
|
+
Scheduler.init();
|
|
174
|
+
onFlush = [];
|
|
175
|
+
});
|
|
176
|
+
afterEach(() => {
|
|
177
|
+
Scheduler.get().run(() => TestScheduler2.frameTimeFactor = 10);
|
|
178
|
+
while (onFlush.length > 0)
|
|
179
|
+
onFlush.shift()?.();
|
|
180
|
+
Scheduler.reset();
|
|
181
|
+
});
|
|
182
|
+
export {
|
|
183
|
+
cold,
|
|
184
|
+
hot,
|
|
185
|
+
schedule,
|
|
186
|
+
time
|
|
187
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SubscriptionLog, TestMessages } from './types';
|
|
2
|
+
import './internal-matchers';
|
|
3
|
+
export type MessagesOrSubscriptions = TestMessages | SubscriptionLog[];
|
|
4
|
+
export declare function assertDeepEqual(actual: MessagesOrSubscriptions, expected?: MessagesOrSubscriptions): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SubscriptionLog, TestMessages } from './types';
|
|
2
|
+
import { MatchersObject } from '@vitest/expect';
|
|
3
|
+
interface InternalMatchers<R = unknown> {
|
|
4
|
+
toBeNotifications: (messages: TestMessages) => R;
|
|
5
|
+
toBeSubscriptions: (subscriptions: SubscriptionLog[]) => R;
|
|
6
|
+
toHaveEmptySubscriptions: () => R;
|
|
7
|
+
}
|
|
8
|
+
export declare const internalMatchers: MatchersObject;
|
|
9
|
+
declare module 'vitest' {
|
|
10
|
+
interface Matchers<T = any> extends InternalMatchers<T> {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {};
|
package/lib/marbles.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import { ColdObservable } from './rxjs/cold-observable';
|
|
2
|
-
import { HotObservable } from './rxjs/hot-observable';
|
|
3
1
|
import { Subscription } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
toHaveSubscriptions(marbles: string | string[]): R;
|
|
8
|
-
toHaveNoSubscriptions(): R;
|
|
9
|
-
toBeMarble(marble: string): R;
|
|
10
|
-
toSatisfyOnFlush(func: () => void): R;
|
|
11
|
-
}
|
|
12
|
-
declare module 'vitest' {
|
|
13
|
-
interface Matchers<T = any> extends CustomMatchers<T> {
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export declare function hot(marbles: string, values?: object, error?: object): HotObservable;
|
|
17
|
-
export declare function cold(marbles: string, values?: object, error?: object): ColdObservable;
|
|
2
|
+
import { ColdObservable, HotObservable } from './types';
|
|
3
|
+
export declare function cold<T = string>(marbles: string, values?: Record<string, T>, error?: any): ColdObservable<T>;
|
|
4
|
+
export declare function hot<T = string>(marbles: string, values?: Record<string, T>, error?: any): HotObservable<T>;
|
|
18
5
|
export declare function time(marbles: string): number;
|
|
19
6
|
export declare function schedule(work: () => void, delay: number): Subscription;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=marbles.d.ts.map
|
package/lib/marblizer.d.ts
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import { SubscriptionLog
|
|
2
|
-
export declare
|
|
3
|
-
static marblize(messages: TestMessages): string;
|
|
4
|
-
static marblizeSubscriptions(logs: SubscriptionLog[]): string[];
|
|
5
|
-
private static marblizeLogEntry;
|
|
6
|
-
private static getNotificationEvents;
|
|
7
|
-
private static extractMarble;
|
|
8
|
-
private static encloseGroupEvents;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=marblizer.d.ts.map
|
|
1
|
+
import { SubscriptionLog } from './types';
|
|
2
|
+
export declare function marblize(logs: SubscriptionLog[]): string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
interface CustomMatchers<R = unknown> {
|
|
3
|
+
toBeObservable<T>(observable: Observable<T>, subscription?: string): R;
|
|
4
|
+
toHaveSubscriptions(marbles: string | string[]): R;
|
|
5
|
+
toHaveNoSubscriptions(): R;
|
|
6
|
+
toBeMarble<T = string>(marbles: string, values?: Record<string, T>, error?: any): R;
|
|
7
|
+
toSatisfyOnFlush(func: () => void): R;
|
|
8
|
+
}
|
|
9
|
+
declare module 'vitest' {
|
|
10
|
+
interface Matchers<T = any> extends CustomMatchers<T> {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { TestScheduler } from 'rxjs/testing';
|
|
2
|
+
export type ColdObservable<T> = ReturnType<typeof TestScheduler.prototype.createColdObservable<T>>;
|
|
3
|
+
export type HotObservable<T> = ReturnType<typeof TestScheduler.prototype.createHotObservable<T>>;
|
|
4
|
+
export type TestObservable<T> = ColdObservable<T> | HotObservable<T>;
|
|
2
5
|
/**
|
|
3
6
|
* Exported return type of TestMessage[] to avoid importing internal APIs.
|
|
4
7
|
*/
|
|
@@ -7,4 +10,3 @@ export type TestMessages = ReturnType<typeof TestScheduler.parseMarbles>;
|
|
|
7
10
|
* Exported return type of SubscriptionLog to avoid importing internal APIs.
|
|
8
11
|
*/
|
|
9
12
|
export type SubscriptionLog = ReturnType<typeof TestScheduler.parseMarblesAsSubscriptions>;
|
|
10
|
-
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@granito/vitest-marbles",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.5",
|
|
4
4
|
"description": "Marble testing helpers library for RxJs and Vitest",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,16 +41,15 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@nx/esbuild": "22.1.2",
|
|
44
|
-
"@nx/js": "22.1.2",
|
|
45
44
|
"@nx/vitest": "22.1.2",
|
|
46
|
-
"@
|
|
45
|
+
"@vitest/coverage-v8": "^4.0.14",
|
|
47
46
|
"esbuild": "^0.27.0",
|
|
48
47
|
"jsdom": "~22.1.0",
|
|
49
48
|
"nx": "22.1.2",
|
|
50
49
|
"rxjs": "^7.8.2",
|
|
51
50
|
"tslib": "^2.3.0",
|
|
52
51
|
"typescript": "~5.9.2",
|
|
53
|
-
"vite": "^7.2.
|
|
52
|
+
"vite": "^7.2.6",
|
|
54
53
|
"vitest": "^4.0.0"
|
|
55
54
|
},
|
|
56
55
|
"peerDependencies": {
|
|
@@ -65,14 +64,13 @@
|
|
|
65
64
|
"{options.outputPath}"
|
|
66
65
|
],
|
|
67
66
|
"options": {
|
|
68
|
-
"outputPath": "dist",
|
|
67
|
+
"outputPath": "dist/vitest-marbles",
|
|
69
68
|
"main": "src/index.ts",
|
|
70
69
|
"tsConfig": "tsconfig.lib.json",
|
|
71
70
|
"format": [
|
|
72
71
|
"esm"
|
|
73
72
|
],
|
|
74
73
|
"declarationRootDir": "src",
|
|
75
|
-
"minify": true,
|
|
76
74
|
"assets": [
|
|
77
75
|
"LICENSE",
|
|
78
76
|
"README.md"
|
package/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marbles-glossary.d.ts","sourceRoot":"","sources":["../../src/lib/marbles-glossary.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,UAAU,MAAM;IAChB,KAAK,MAAM;IACX,SAAS,MAAM;IACf,YAAY,MAAM;IAClB,cAAc,MAAM;IACpB,UAAU,MAAM;IAChB,QAAQ,MAAM;CACf"}
|
package/lib/marbles.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marbles.d.ts","sourceRoot":"","sources":["../../src/lib/marbles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGpC,MAAM,MAAM,2BAA2B,GAAG,cAAc,GAAG,aAAa,CAAC;AAEzE,UAAU,cAAc,CAAC,CAAC,GAAG,OAAO;IAClC,cAAc,CAAC,UAAU,EAAE,2BAA2B,GAAG,CAAC,CAAC;IAE3D,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;IAEnD,qBAAqB,IAAI,CAAC,CAAC;IAE3B,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC;IAE9B,gBAAgB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,CAAC,CAAC;CACvC;AAED,OAAO,QAAQ,QAAQ,CAAC;IACtB,UAAU,QAAQ,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;KACpD;CACF;AAED,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa,CAEnF;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAErF;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAEtE"}
|
package/lib/marblizer.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marblizer.d.ts","sourceRoot":"","sources":["../../src/lib/marblizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAO7D,qBAAa,SAAS;WACN,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM;WAYxC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE;IAQtE,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAqBpC,OAAO,CAAC,MAAM,CAAC,aAAa;IAS5B,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAMlC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification-event.d.ts","sourceRoot":"","sources":["../../src/lib/notification-event.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAiB;IAGT,KAAK,EAAE,MAAM;IAFhC,OAAO,SAAM;gBAEM,KAAK,EAAE,MAAM;IAGhC,IAAI,GAAG,IAAI,MAAM,CAEhB;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification-kind.d.ts","sourceRoot":"","sources":["../../src/lib/notification-kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,eAAO,MAAM,YAAY,IAAK,CAAC;AAE/B,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { SubscriptionLog, TestMessages } from './types';
|
|
2
|
-
import '../vitest/custom-matchers';
|
|
3
|
-
export type MessageOrSubscription = TestMessages | SubscriptionLog[];
|
|
4
|
-
export declare function assertDeepEqual(actual: MessageOrSubscription, expected: MessageOrSubscription): void;
|
|
5
|
-
//# sourceMappingURL=assert-deep-equal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assert-deep-equal.d.ts","sourceRoot":"","sources":["../../../src/lib/rxjs/assert-deep-equal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,2BAA2B,CAAC;AAEnC,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,eAAe,EAAE,CAAC;AAarE,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,qBAAqB,QAU7F"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { TestScheduler } from 'rxjs/testing';
|
|
3
|
-
import { SubscriptionLog } from './types';
|
|
4
|
-
export declare class ColdObservable extends Observable<any> {
|
|
5
|
-
marbles: string;
|
|
6
|
-
values?: Record<string, any> | undefined;
|
|
7
|
-
error?: any | undefined;
|
|
8
|
-
source: ReturnType<TestScheduler['createColdObservable']>;
|
|
9
|
-
constructor(marbles: string, values?: Record<string, any> | undefined, error?: any | undefined);
|
|
10
|
-
getSubscriptions(): SubscriptionLog[];
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=cold-observable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cold-observable.d.ts","sourceRoot":"","sources":["../../../src/lib/rxjs/cold-observable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,qBAAa,cAAe,SAAQ,UAAU,CAAC,GAAG,CAAC;IAG9B,OAAO,EAAE,MAAM;IAAS,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAAS,KAAK,CAAC,EAAE,GAAG;IAFlF,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAAC;gBAEhD,OAAO,EAAE,MAAM,EAAS,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAA,EAAS,KAAK,CAAC,EAAE,GAAG,YAAA;IAM3F,gBAAgB,IAAI,eAAe,EAAE;CAGtC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { TestScheduler } from 'rxjs/testing';
|
|
3
|
-
import { SubscriptionLog } from './types';
|
|
4
|
-
export declare class HotObservable extends Observable<any> {
|
|
5
|
-
marbles: string;
|
|
6
|
-
values?: Record<string, any> | undefined;
|
|
7
|
-
error?: any | undefined;
|
|
8
|
-
source: ReturnType<TestScheduler['createHotObservable']>;
|
|
9
|
-
constructor(marbles: string, values?: Record<string, any> | undefined, error?: any | undefined);
|
|
10
|
-
getSubscriptions(): SubscriptionLog[];
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=hot-observable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hot-observable.d.ts","sourceRoot":"","sources":["../../../src/lib/rxjs/hot-observable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,qBAAa,aAAc,SAAQ,UAAU,CAAC,GAAG,CAAC;IAG7B,OAAO,EAAE,MAAM;IAAS,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAAS,KAAK,CAAC,EAAE,GAAG;IAFlF,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC;gBAE/C,OAAO,EAAE,MAAM,EAAS,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAA,EAAS,KAAK,CAAC,EAAE,GAAG,YAAA;IAM3F,gBAAgB,IAAI,eAAe,EAAE;CAGtC"}
|
package/lib/rxjs/scheduler.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { TestMessages } from './types';
|
|
3
|
-
import { TestScheduler } from 'rxjs/testing';
|
|
4
|
-
export declare class Scheduler {
|
|
5
|
-
static instance: TestScheduler | null;
|
|
6
|
-
static init(): void;
|
|
7
|
-
static get(): TestScheduler;
|
|
8
|
-
static reset(): void;
|
|
9
|
-
static materializeInnerObservable(observable: Observable<any>, outerFrame: number): TestMessages;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/lib/rxjs/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,qBAAa,SAAS;IACpB,OAAc,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;WAE/B,IAAI,IAAI,IAAI;WAIZ,GAAG,IAAI,aAAa;WAOpB,KAAK,IAAI,IAAI;WAIb,0BAA0B,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,YAAY;CAMxG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strip-alignment-chars.d.ts","sourceRoot":"","sources":["../../../src/lib/rxjs/strip-alignment-chars.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,UAElD"}
|
package/lib/rxjs/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/rxjs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,YAAY,CAAC,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SubscriptionLog, TestMessages } from '../rxjs/types';
|
|
2
|
-
import { MatchersObject } from '@vitest/expect';
|
|
3
|
-
interface CustomMatchers<R = unknown> {
|
|
4
|
-
toBeNotifications: (messages: TestMessages) => R;
|
|
5
|
-
toBeSubscriptions: (subscriptions: SubscriptionLog[]) => R;
|
|
6
|
-
toHaveEmptySubscriptions: () => R;
|
|
7
|
-
}
|
|
8
|
-
export declare const customTestMatchers: MatchersObject;
|
|
9
|
-
declare module 'vitest' {
|
|
10
|
-
interface Matchers<T = any> extends CustomMatchers<T> {
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=custom-matchers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-matchers.d.ts","sourceRoot":"","sources":["../../../src/lib/vitest/custom-matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAqB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEnE,UAAU,cAAc,CAAC,CAAC,GAAG,OAAO;IAClC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,CAAC,CAAC;IAEjD,iBAAiB,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;IAE3D,wBAAwB,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,eAAO,MAAM,kBAAkB,EAAE,cA4FhC,CAAA;AAKD,OAAO,QAAQ,QAAQ,CAAC;IACtB,UAAU,QAAQ,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;KACpD;CACF"}
|