Skip to content

Commit 89943dc

Browse files
authored
Adds support for wrapTableHeader prop for lightning-datatable (#456)
* Adds additional public property, wrapTableHeader, to lightning-datatable stub. This property was added in 248 but has been missing from sfdx-lwc-jest since then * Updates to also include lightning/graphql stubs
1 parent e3f9032 commit 89943dc

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/lightning-stubs/datatable/datatable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default class Datatable extends LightningElement {
3232
@api sortedBy;
3333
@api sortedDirection;
3434
@api suppressBottomBar;
35+
@api wrapTableHeader;
3536
@api wrapTextMaxLines;
3637
@api getSelectedRows() {}
3738
@api openInlineEdit() {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2025, 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 { gql, graphql } from '../uiGraphQLApi/uiGraphQLApi';
8+
9+
export { gql, graphql };

src/lightning-stubs/uiGraphQLApi/uiGraphQLApi.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
*/
77
import { createTestWireAdapter } from '@salesforce/wire-service-jest-util';
88

9+
/**
10+
* @deprecated import from lightning/graphql instead
11+
*/
912
export class graphql extends createTestWireAdapter() {
1013
static emit(value, filterFn) {
1114
super.emit({ data: value, errors: undefined }, filterFn);
@@ -22,5 +25,8 @@ export class graphql extends createTestWireAdapter() {
2225
}
2326
}
2427

28+
/**
29+
* @deprecated import from lightning/graphql instead
30+
*/
2531
export const gql = jest.fn();
2632
export const refreshGraphQL = jest.fn();

0 commit comments

Comments
 (0)