iceddev/sql-load — pull request #3 by urbantumbleweed (2014-12-18 23:48:23+00:00)
Title: Testing

# Tests

Tests were performed with lab. 100% of functions have been tested.

## Load

Loads a file synchronously from the base of the project. The base of the project is defined as the nearest directory where a package.json file resides.

`filename` path must include all subdirectories separating the file from base

## Config

`.config()` takes an object with the signature `{ basePath: '/project/base', ext: '.sql' }`

`.config()` works when setting alternate file extension. Default file extension is '.sql'

Set a new directory as long as new basePath has package.json. The format is:
`basePath: /this/is/the/base`

If the new basePath directory has sub-directories where target files are located, the basePath has a slightly different signature with a `/` added to the end. The format is:
`basePath: /this/is/the/base/`

## Async

Loads a file asynchronously from the `basePath` of a project.

`.async()` takes a filename and callback.