Module: test

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>

Members

(inner, constant) isbns

Array containing some existing ISBN numbers for use in testing
Source:

Methods

(async, inner) closeTestDB() → {Promise:.<void:>}

Closes the test database
Source:
Returns:
Type
Promise:.<void:>

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates an account in the database
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) createAccount() → {request.SuperTestStatic.Test}

Creates a fake account for testing
Source:
Returns:
Type
request.SuperTestStatic.Test

(inner) getConnection() → {Promise:.<mysql.Connection:>}

Gets a connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(inner) getRootConnection() → {Promise:.<mysql.Connection:>}

Gets a root connection to the database
Source:
Returns:
Type
Promise:.<mysql.Connection:>

(async, inner) initializeTestDB() → {Promise:.<void:>}

Initializes the test database with the migrations
Source:
Returns:
Type
Promise:.<void:>

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(inner) randomValidISBN() → {string}

Generates a random valid ISBN
Source:
Returns:
Type
string

(async, inner) saveImageFromUrl(url) → {string}

Downloads an image from a URL and saves it to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
pathToTempFile
Type
string

(async, inner) saveImageFromUrl(url) → {Promise:.<string:>}

Saves an image from a URL to a temporary file
Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise:.<string:>