Skip to content

Commit a5aaefc

Browse files
Fix TypeScript compilation error: remove duplicate 'default' property in august-yale mock (#172)
Fixes a TypeScript compilation error in `src/platform.test.ts` where the august-yale module mock had duplicate `default` properties in the same object literal: ```typescript // Before (compilation error) return { default: class August { ... }, // First default property default: MockConstructor, // Second default property - DUPLICATE! } // After (fixed) return { default: MockConstructor, } ``` The error was: ``` src/platform.test.ts:35:5 - error TS1117: An object literal cannot have multiple properties with the same name. ``` The fix removes the redundant class definition and keeps only the `MockConstructor` as the default export, which already provides all the necessary static methods (`authorize`, `validate`, `details`) for testing. All existing tests continue to pass. Fixes #171. <!-- START COPILOT CODING AGENT TIPS --> --- 💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey3.medallia.com/?EAHeSx-AP01bZqG0Ld9QLQ) to start the survey. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Donavan Becker <[email protected]> Co-authored-by: donavanbecker <[email protected]>
1 parent 4322bf7 commit a5aaefc

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/platform.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ vi.mock('august-yale', () => {
2323
MockConstructor.validate = vi.fn()
2424

2525
return {
26-
default: class August {
27-
public credentials: any
28-
constructor(credentials: any) {
29-
this.credentials = credentials
30-
}
31-
static async authorize() {}
32-
static async validate() { return true }
33-
static async details() { return [] }
34-
},
3526
default: MockConstructor,
3627
}
3728
})

0 commit comments

Comments
 (0)