Skip to content

Commit 1f93cdb

Browse files
devversionandrewseguin
authored andcommitted
chore(data-table): hide stability warning in jasmine (#4840)
* No longer shows the data-table stability warning inside of jasmine tests.
1 parent e98372e commit 1f93cdb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib/core/data-table/data-table.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ export class CdkTable<T> implements CollectionViewer {
101101

102102
constructor(private readonly _differs: IterableDiffers,
103103
private readonly _changeDetectorRef: ChangeDetectorRef) {
104-
console.warn('The data table is still in active development ' +
104+
// Show the stability warning of the data-table only if it doesn't run inside of jasmine.
105+
// This is just temporary and should reduce warnings when running the tests.
106+
if (!(typeof window !== 'undefined' && window['jasmine'])) {
107+
console.warn('The data table is still in active development ' +
105108
'and should be considered unstable.');
109+
}
106110

107111
// TODO(andrewseguin): Add trackby function input.
108112
// Find and construct an iterable differ that can be used to find the diff in an array.

0 commit comments

Comments
 (0)