Minor formatting changes

This commit is contained in:
Greg 2021-08-23 19:25:07 -06:00
parent a271c4a04b
commit 49aea3038b
4 changed files with 31 additions and 31 deletions

View File

@ -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,

View File

@ -4,8 +4,8 @@
* https://woocommerce.github.io/woocommerce-rest-api-docs/#errors
*/
const errorResponse = {
code: "",
message: "",
code: '',
message: '',
data: {
status: 400
}

View File

@ -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

View File

@ -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'
}
}
},