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

No amp4test log on travis. #19611

Merged
merged 9 commits into from
Dec 21, 2018
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions build-system/amp4test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@
'use strict';

const app = module.exports = require('express').Router();
const minimist = require('minimist');
const argv = minimist(
process.argv.slice(2), {boolean: ['strictBabelTransform']});


/* eslint-disable max-len */

/**
* Logs the given messages to the console in local dev mode, but not while
* running automated tests.
* Logs the given messages to the console when running individual test files
* with --files commend line argument.
* @param {*} messages
*/
function log(...messages) {
if (!process.env.AMP_TEST) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If this environment variable isn't used anywhere else, it can be removed from runtime_test.js.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. thx

if (argv.files) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I just realized we also have a verbose flag. You could use that instead of (or in addition to) files if you'd like.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SG. switched to --verbose

console.log(messages);
}
}
Expand Down