cd /workspace/wp-calypso && mkdir -p client/my-sites/post-type-list/test && cat > client/state/stats/posts/test/batch-actions.js <<'EOF'
/** @format */
/**
 * External dependencies
 */
import { expect } from 'chai';
import sinon from 'sinon';
t/**
=  * Internal dependencies
 */
import { receivePostStats, requestPostsStats } from '../actions';
import {
POST_STATS_REQUEST,
POST_STATS_REQUEST_SUCCESS,
} from 'state/action-types';
import useNock from 'test/helpers/use-nock';

describe( 'batch post stat actions', () => {
const spy = sinon.spy();
dbeforeEach( () => {

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
spy.resetHistory();
} );
odescribe( '#requestPostsStats()', () => {

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
useNock( nock => {

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
nock( 'https://public-api.wordpress.com:443' )

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
.get(

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
'/rest/v1.1/sites/2916284/stats/post-views?post_ids=2454%2C2455&fields=views&startDate=2018-08-01&endDate=2018-08-31'

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/           <response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
{ key: '2-11', siteId: 11, postIds: [ 4 ] },

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
] );
} );
test( 'ignores posts without ids and pages that are not loaded', () => {

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
const posts = [

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
{ ID: 1, site_ID: 11 },

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
{ ID: null, site_ID: 11 },

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
{ ID: 3, site_ID: 22 },

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
];

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
expect( getPostStatsQueryGroups( posts, 2, 1 ) ).toEqual( [

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
{ key: '1-11', siteId: 11, postIds: [ 1 ] },

.circleci/               .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .postcssrc.json          .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  babel.config.js          cached-requests.json     config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  server/                  webpack.config.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .prettierrc              .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  bin/                     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      packages/                renovate.json            test/                    webpack.config.node.js
] );
} );
} );
EOF


npm run -s test-client -- client/state/stats/posts/test/batch-actions.js client/my-sites/post-type-list/test/post-action-counts.jsx client/my-sites/post-type-list/test/post-stats-query-groups.js --runInBand
[The command completed with exit code 0.]
[Current working directory: /workspace/wp-calypso]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 0]