Skip to content

Commit 854a95b

Browse files
authored
Progress (#11)
* progress. * stuff * root proxy * even more progress. * more progress. * fixes for stability. * commit messages.
1 parent c714142 commit 854a95b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1340
-1200
lines changed

dist/spec/index.test.js

Lines changed: 62 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spec/index.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spec/issues/9.test.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export declare class Example {
2+
blocking(): number;
3+
}

dist/spec/issues/9.test.js

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spec/issues/9.test.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/Context.d.ts

Lines changed: 14 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,16 @@
1-
export declare abstract class ProxyPropertyContextBase {
2-
name: string;
3-
type: 'function' | 'object';
1+
import { ContextState } from "./states/ContextState";
2+
import { InitialState } from "./states/InitialState";
3+
export declare class Context {
4+
private _initialState;
5+
private _proxy;
6+
private _rootProxy;
7+
private _state;
48
constructor();
5-
}
6-
export declare class ProxyPropertyContext extends ProxyPropertyContextBase {
7-
type: 'object';
8-
mimicks: Function;
9-
returnValues: any[];
10-
constructor();
11-
promoteToMethod(): ProxyMethodPropertyContext;
12-
}
13-
export declare class ProxyMethodPropertyContext extends ProxyPropertyContextBase {
14-
method: ProxyMethodContext;
15-
type: 'function';
16-
constructor();
17-
}
18-
export declare class ProxyMethodContext {
19-
arguments: any[];
20-
returnValues: any[];
21-
mimicks: Function;
22-
constructor();
23-
}
24-
export declare class ProxyCallRecords {
25-
expected: ProxyExpectation;
26-
actual: ProxyCallRecord[];
27-
constructor();
28-
}
29-
export declare class ProxyExpectation {
30-
callCount: number;
31-
negated: boolean;
32-
propertyName: string;
33-
arguments: Array<any>;
34-
constructor();
35-
}
36-
export declare class ProxyObjectContext {
37-
property: ProxyPropertyContext | ProxyMethodPropertyContext;
38-
calls: ProxyCallRecords;
39-
constructor();
40-
setExpectations(count: number, negated: boolean): void;
41-
findActualPropertyCalls(propertyName: string): ProxyCallRecord[];
42-
findActualMethodCalls(propertyName: string, args?: any[]): ProxyCallRecord[];
43-
getLastCall(): ProxyCallRecord;
44-
removeActualPropertyCall(call: ProxyCallRecord): void;
45-
addActualPropertyCall(): ProxyCallRecord;
46-
fixExistingCallArguments(): void;
47-
}
48-
export declare class ProxyCallRecord {
49-
callCount: number;
50-
property: ProxyPropertyContext | ProxyMethodPropertyContext;
51-
argumentsSnapshot: any[];
52-
constructor(property?: ProxyPropertyContext | ProxyMethodPropertyContext);
9+
apply(args: any[]): any;
10+
set(property: PropertyKey, value: any): void;
11+
get(property: PropertyKey): any;
12+
readonly proxy: any;
13+
readonly rootProxy: any;
14+
readonly initialState: InitialState;
15+
state: ContextState;
5316
}

0 commit comments

Comments
 (0)