Skip to content

Conversation

@andrewseguin
Copy link
Contributor

Starts up a testing spec just for the data source - will be useful for adding tests over the sorting and pagination functions

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 9, 2020
@andrewseguin andrewseguin added merge safe P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Mar 9, 2020
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental premature approval


/** Randomly shuffles the array of data. */
function shuffle(data: any[]) {
return data.slice().sort(() => (Math.random() - 0.5));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No random() in tests!

@andrewseguin andrewseguin force-pushed the add-datasource-test branch from 1f3a0f5 to 143e58b Compare April 9, 2020 16:59
@andrewseguin
Copy link
Contributor Author

Updated to replace shuffle with just a plain reverse

@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker labels Apr 9, 2020
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmalerba mmalerba merged commit 3238fbb into angular:master Apr 9, 2020
mmalerba pushed a commit that referenced this pull request Apr 14, 2020
* test(table): add tests for MatTableDataSource

* switch shuffle to reverse
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants