Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Fixes 2 unit tests #14561

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

jonkeller
Copy link
Contributor

@jonkeller jonkeller commented Apr 11, 2018

Fixes the 2 unit tests assigned to me in #14336
In the first test, we were getting a console error which was not necessary, so fixed the code to not cause that.
In the second test, we were testing an error condition which was expected to generate a console error, so wrapped that in allowConsoleError()

sandbox.stub(analytics, 'predefinedConfig_').value(
{
'foo': {
'triggers': {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

root.listenRoot(spec, null, null, null);
allowConsoleError(() => {
// Expect user().error(TAG,
// 'visiblePercentageThresholds entry invalid min/max value')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

root.listenRoot(spec, null, null, null);
allowConsoleError(() => {
// On the [10, 10] only, again expect user().error(TAG,
// 'visiblePercentageThresholds entry invalid min/max value')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor Author

@jonkeller jonkeller Apr 12, 2018

Choose a reason for hiding this comment

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

Comment should say "[10, 10] and [30, 30] only". I noticed this after it was merged, so corrected in #14576

@jonkeller jonkeller self-assigned this Apr 11, 2018
@jonkeller jonkeller changed the title Fixes 2 unit tests ✅ Fixes 2 unit tests Apr 11, 2018
@jonkeller jonkeller changed the title ✅ Fixes 2 unit tests ✅ Fixes 2 unit tests Apr 11, 2018
@keithwrightbos keithwrightbos merged commit 839ec0e into ampproject:master Apr 12, 2018
glevitzky pushed a commit that referenced this pull request Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants