From 49aea3038b9014aa8dee063f37968f023b38a822 Mon Sep 17 00:00:00 2001 From: Greg Date: Mon, 23 Aug 2021 19:25:07 -0600 Subject: [PATCH] Minor formatting changes --- tests/e2e/api-core-tests/data/order.js | 36 +++++++++---------- .../data/shared/error-response.js | 4 +-- tests/e2e/api-core-tests/jest.config.js | 10 +++--- .../utils/api-collection/build-collection.js | 12 +++---- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/tests/e2e/api-core-tests/data/order.js b/tests/e2e/api-core-tests/data/order.js index 99deedd4f28..286abccf19a 100644 --- a/tests/e2e/api-core-tests/data/order.js +++ b/tests/e2e/api-core-tests/data/order.js @@ -9,39 +9,39 @@ const { customerBilling, customerShipping } = require('./shared'); */ const productLineItems = { - name: "", - product_id: "", + name: '', + product_id: '', variation_id: 0, quantity: 0, - tax_class: "", - subtotal: "", - total: "", + tax_class: '', + subtotal: '', + total: '', } const shippingLines = { - method_title: "", - method_id: "", - total: "", + method_title: '', + method_id: '', + total: '', } const feeLines = { - name: "", - tax_class: "", - tax_status: "", - total: "", + name: '', + tax_class: '', + tax_status: '', + total: '', } const couponLines = { - code: "" + code: '' } const order = { - payment_method: "", - payment_method_title: "", - status: "pending", + payment_method: '', + payment_method_title: '', + status: 'pending', set_paid: false, - currency: "USD", - customer_note: "", + currency: 'USD', + customer_note: '', customer_id: 0, billing: customerBilling, shipping: customerShipping, diff --git a/tests/e2e/api-core-tests/data/shared/error-response.js b/tests/e2e/api-core-tests/data/shared/error-response.js index 81353362a02..370925deca6 100644 --- a/tests/e2e/api-core-tests/data/shared/error-response.js +++ b/tests/e2e/api-core-tests/data/shared/error-response.js @@ -4,8 +4,8 @@ * https://woocommerce.github.io/woocommerce-rest-api-docs/#errors */ const errorResponse = { - code: "", - message: "", + code: '', + message: '', data: { status: 400 } diff --git a/tests/e2e/api-core-tests/jest.config.js b/tests/e2e/api-core-tests/jest.config.js index d3f06e55df9..ab9626e82fd 100644 --- a/tests/e2e/api-core-tests/jest.config.js +++ b/tests/e2e/api-core-tests/jest.config.js @@ -1,21 +1,21 @@ require('dotenv').config(); const { BASE_URL, VERBOSE, USE_INDEX_PERMALINKS } = process.env; -const verboseOutput = ( VERBOSE === 'true' ); +const verboseOutput = VERBOSE === 'true'; // Update the API path if the `USE_INDEX_PERMALINKS` flag is set -const useIndexPermalinks = ( USE_INDEX_PERMALINKS === 'true' ); +const useIndexPermalinks = USE_INDEX_PERMALINKS === 'true'; let apiPath = `${BASE_URL}/wp-json/wc/v3/`; -if ( useIndexPermalinks ) { +if (useIndexPermalinks) { apiPath = `${BASE_URL}/?rest_route=/wc/v3/`; } module.exports = { // Use the `jest-runner-groups` package. - runner: "groups", + runner: 'groups', // A set of global variables that need to be available in all test environments globals: { - API_PATH: apiPath + API_PATH: apiPath, }, // Indicates whether each individual test should be reported during the run diff --git a/tests/e2e/api-core-tests/utils/api-collection/build-collection.js b/tests/e2e/api-core-tests/utils/api-collection/build-collection.js index c5df96a9ebf..6fbcaf6d449 100644 --- a/tests/e2e/api-core-tests/utils/api-collection/build-collection.js +++ b/tests/e2e/api-core-tests/utils/api-collection/build-collection.js @@ -18,17 +18,17 @@ const { // Set up our empty collection const postmanCollection = new Collection( { auth: { - type: "basic", + type: 'basic', basic: [ { - key: "username", + key: 'username', value: USERNAME, - type: "string" + type: 'string' }, { - key: "password", + key: 'password', value: PASSWORD, - type: "string" + type: 'string' }, ] }, @@ -85,7 +85,7 @@ for ( const key in resources ) { raw: JSON.stringify( api.payload ), options: { raw: { - language: "json" + language: 'json' } } },