File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/lightning-stubs/uiGraphQLApi Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2023, salesforce.com, inc.
3+ * All rights reserved.
4+ * SPDX-License-Identifier: MIT
5+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6+ */
7+ import { createTestWireAdapter } from '@salesforce/wire-service-jest-util' ;
8+
9+ export class graphql extends createTestWireAdapter ( ) {
10+ static emit ( value , filterFn ) {
11+ super . emit ( { data : value , errors : undefined } , filterFn ) ;
12+ }
13+
14+ static emitErrors ( errors , filterFn ) {
15+ super . emit ( { data : undefined , errors } , filterFn ) ;
16+ }
17+
18+ constructor ( dataCallback ) {
19+ super ( dataCallback ) ;
20+
21+ graphql . emit ( undefined ) ;
22+ }
23+ }
24+
25+ export const gql = jest . fn ( ) ;
26+ export const refreshGraphQL = jest . fn ( ) ;
You can’t perform that action at this time.
0 commit comments