Skip to content

Commit 21732a1

Browse files
committed
clean up test case
1 parent 7667f9d commit 21732a1

File tree

1 file changed

+0
-86
lines changed

1 file changed

+0
-86
lines changed

tests/rules/noRepeatedMemberAccess.test.ts

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ describe("Rule: no-spread", () => {
5858
export const apple = Juice.D31
5959
export const banana = Juice.D32
6060
export const cat = Juice.D33
61-
`,
62-
`
63-
export namespace Constants {
64-
export const defaultDebounceTimeRegular_s: u32 = SendTime.NEXT_REGULAR
65-
export const debounceTimeGnssInnerCity_s = SendTime.S30
66-
export const debounceTimeGnssMotorway_s = SendTime.S120
67-
}
6861
`,
6962
/**
7063
* WARN: should NOT extract [] elements as they can get modified easily
@@ -81,12 +74,6 @@ export namespace Constants {
8174
data[0][1].count++;
8275
send(data[0][1].id);
8376
`,
84-
`
85-
const a = dataset[0][1].x + dataset[0][1].y;
86-
dataset[0][1].update();
87-
const b = dataset[0][1].z * 2;
88-
notify(dataset[0][1].timestamp);
89-
`,
9077
// WARN: DONT extract when function with possible side effect is called upon
9178
`
9279
const a = data.x + data.y;
@@ -95,77 +82,10 @@ export namespace Constants {
9582
notify(data.x);
9683
`,
9784
`
98-
const first = data.items[0].config['security'].rules[2].level;
99-
data.items[0].config['security'].rules[2].enabled = true;
100-
validate(data.items[0].config['security'].rules[2].level);
101-
`,
102-
`
10385
const v1 = obj[123].value;
10486
const v2 = obj[123].value;
10587
const v3 = obj[123].value;
10688
`,
107-
// some more complex cases
108-
`
109-
110-
/**
111-
* Distance-based emission strategy
112-
*/
113-
export class DistanceBasedDeliveryStrategy implements EmissionStrategy {
114-
private checkStateChange(attr: NumericProperty): bool {
115-
return (
116-
attr.getCurrent().isUnstable() &&
117-
attr.getPrevious() != null &&
118-
attr.getPrevious()!.isStable()
119-
);
120-
}
121-
122-
public isEqual(other: GenericValueContainer<i32>): bool {
123-
return (
124-
this.isStable() == other.isStable() &&
125-
this.isActive() == other.isActive() &&
126-
(!this.isActive() || this.getValue() == other.getValue())
127-
);
128-
}
129-
130-
public copy(): GenericValueContainer<i64> {
131-
const clone = new LongValueWrapper(this.initializer);
132-
clone.status = this.status;
133-
clone.error = this.error;
134-
return clone;
135-
}
136-
}`,
137-
`
138-
139-
let activeConfig: BaseConfiguration;
140-
const configData = AppContext.loadSettings();
141-
142-
if (configData) {
143-
activeConfig = configData;
144-
} else {
145-
activeConfig = new BaseConfiguration();
146-
activeConfig.initializationDelay = Constants.DEFAULT_INIT_DELAY;
147-
activeConfig.fastPollingInterval = Constants.DEFAULT_FAST_INTERVAL;
148-
activeConfig.normalPollingInterval = Constants.DEFAULT_NORMAL_INTERVAL;
149-
}
150-
151-
if (runtimeEnv && eventController) {
152-
SystemHookManager.instance = this;
153-
this.eventController = eventController;
154-
runtimeEnv.registerStateChangeListener(SystemHookManager.handleStateChange);
155-
this.lastKnownState = runtimeEnv.getCurrentEnvironmentState();
156-
}
157-
`,
158-
`
159-
if (
160-
currentSession.authType == AuthType.PRIVILEGED &&
161-
currentSession.status == SessionStatus.ACTIVE &&
162-
this.runtimeEnv.getCurrentEnvironmentState().isPresent()
163-
) {
164-
const timestamp = getTimestamp();
165-
serviceInstance.lastSyncTime = timestamp;
166-
}
167-
168-
`,
16989
// shouldn't report when modified
17090
`
17191
const v1 = a.b.c;
@@ -179,12 +99,6 @@ export namespace Constants {
17999
const v2 = a.b.c;
180100
const v3 = a.b.c;
181101
`,
182-
`
183-
this.vehicleSys!.automobile = new TransportCore(new TransportBlueprint());
184-
this.vehicleSys!.automobile!.underframe = new ChassisAssembly(new ChassisSchema());
185-
this.vehicleSys!.automobile!.underframe!.propulsionCover = new EngineEnclosure(new EnclosureSpec());
186-
this.vehicleSys!.automobile!.underframe!.logisticsBay = new CargoModule(new ModuleTemplate());
187-
`,
188102
],
189103

190104
invalid: [

0 commit comments

Comments
 (0)