Minor formatting changes
This commit is contained in:
parent
a271c4a04b
commit
49aea3038b
|
@ -9,39 +9,39 @@ const { customerBilling, customerShipping } = require('./shared');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const productLineItems = {
|
const productLineItems = {
|
||||||
name: "",
|
name: '',
|
||||||
product_id: "",
|
product_id: '',
|
||||||
variation_id: 0,
|
variation_id: 0,
|
||||||
quantity: 0,
|
quantity: 0,
|
||||||
tax_class: "",
|
tax_class: '',
|
||||||
subtotal: "",
|
subtotal: '',
|
||||||
total: "",
|
total: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
const shippingLines = {
|
const shippingLines = {
|
||||||
method_title: "",
|
method_title: '',
|
||||||
method_id: "",
|
method_id: '',
|
||||||
total: "",
|
total: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
const feeLines = {
|
const feeLines = {
|
||||||
name: "",
|
name: '',
|
||||||
tax_class: "",
|
tax_class: '',
|
||||||
tax_status: "",
|
tax_status: '',
|
||||||
total: "",
|
total: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
const couponLines = {
|
const couponLines = {
|
||||||
code: ""
|
code: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const order = {
|
const order = {
|
||||||
payment_method: "",
|
payment_method: '',
|
||||||
payment_method_title: "",
|
payment_method_title: '',
|
||||||
status: "pending",
|
status: 'pending',
|
||||||
set_paid: false,
|
set_paid: false,
|
||||||
currency: "USD",
|
currency: 'USD',
|
||||||
customer_note: "",
|
customer_note: '',
|
||||||
customer_id: 0,
|
customer_id: 0,
|
||||||
billing: customerBilling,
|
billing: customerBilling,
|
||||||
shipping: customerShipping,
|
shipping: customerShipping,
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* https://woocommerce.github.io/woocommerce-rest-api-docs/#errors
|
* https://woocommerce.github.io/woocommerce-rest-api-docs/#errors
|
||||||
*/
|
*/
|
||||||
const errorResponse = {
|
const errorResponse = {
|
||||||
code: "",
|
code: '',
|
||||||
message: "",
|
message: '',
|
||||||
data: {
|
data: {
|
||||||
status: 400
|
status: 400
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const { BASE_URL, VERBOSE, USE_INDEX_PERMALINKS } = process.env;
|
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
|
// 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/`;
|
let apiPath = `${BASE_URL}/wp-json/wc/v3/`;
|
||||||
if ( useIndexPermalinks ) {
|
if (useIndexPermalinks) {
|
||||||
apiPath = `${BASE_URL}/?rest_route=/wc/v3/`;
|
apiPath = `${BASE_URL}/?rest_route=/wc/v3/`;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// Use the `jest-runner-groups` package.
|
// Use the `jest-runner-groups` package.
|
||||||
runner: "groups",
|
runner: 'groups',
|
||||||
|
|
||||||
// A set of global variables that need to be available in all test environments
|
// A set of global variables that need to be available in all test environments
|
||||||
globals: {
|
globals: {
|
||||||
API_PATH: apiPath
|
API_PATH: apiPath,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Indicates whether each individual test should be reported during the run
|
// Indicates whether each individual test should be reported during the run
|
||||||
|
|
|
@ -18,17 +18,17 @@ const {
|
||||||
// Set up our empty collection
|
// Set up our empty collection
|
||||||
const postmanCollection = new Collection( {
|
const postmanCollection = new Collection( {
|
||||||
auth: {
|
auth: {
|
||||||
type: "basic",
|
type: 'basic',
|
||||||
basic: [
|
basic: [
|
||||||
{
|
{
|
||||||
key: "username",
|
key: 'username',
|
||||||
value: USERNAME,
|
value: USERNAME,
|
||||||
type: "string"
|
type: 'string'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "password",
|
key: 'password',
|
||||||
value: PASSWORD,
|
value: PASSWORD,
|
||||||
type: "string"
|
type: 'string'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -85,7 +85,7 @@ for ( const key in resources ) {
|
||||||
raw: JSON.stringify( api.payload ),
|
raw: JSON.stringify( api.payload ),
|
||||||
options: {
|
options: {
|
||||||
raw: {
|
raw: {
|
||||||
language: "json"
|
language: 'json'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue