File tree Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2018, 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+ 'use strict' ;
8+
9+ const path = require ( 'path' ) ;
10+
11+ module . exports = {
12+ moduleFileExtensions : [ 'js' , 'html' ] ,
13+ transform : {
14+ '^.+\\.(js|html|css)$' : require . resolve ( '@lwc/jest-transformer' ) ,
15+ } ,
16+ resolver : path . resolve ( __dirname , './src/resolver.js' ) ,
17+ testPathIgnorePatterns : [ '<rootDir>/node_modules/' ] ,
18+ snapshotSerializers : [ require . resolve ( '@lwc/jest-serializer' ) ] ,
19+ } ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2018, 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 method from '../method' ;
8+
9+ describe ( 'apex resources' , ( ) => {
10+ it ( 'should return a resolved promise when apex method is invoked imperatively' , ( ) => {
11+ let resolved = false ;
12+ method ( ) . then ( ( ) => ( resolved = true ) ) ;
13+
14+ return Promise . resolve ( ) . then ( ( ) => {
15+ expect ( resolved ) . toBe ( true ) ;
16+ } ) ;
17+ } ) ;
18+ } ) ;
Original file line number Diff line number Diff line change 66 */
77import { createApexTestWireAdapter } from '@salesforce/wire-service-jest-util' ;
88
9- export default createApexTestWireAdapter ( jest . fn ( ) ) ;
9+ export default createApexTestWireAdapter ( jest . fn ( ) . mockImplementation ( ( ) => Promise . resolve ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments