Skip to content
Acceptance Tests for the NYC Geosearch API
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts
skip_tests
test_cases
.gitignore
.jshintignore
.jshintrc
.lgtm
Dockerfile
README.md
config.json
package-lock.json
package.json
push-json.js

README.md

NYC Geosearch Acceptance Tests

This repository contains all of the NYC Geosearch API acceptance tests, which are automated tests used to identify improvements and regressions between various versions of the API and the underlying data.

More about Geosearch

Requirements

Local development

  • Clone this repo: git clone git@github.com:NYCPlanning/labs-geosearch-acceptance-tests.git
  • Navigate to the project directory: cd labs-geosearch-acceptance-tests
  • Install Dependencies: npm install

Usage

Default to running all tests against production:

$ npm test

Save failing results as JSON files in /failures/ (one per failing test):

$ npm test -- -o json

Test Cases

For a full description of what can go in tests, see the pelias-fuzzy-tester documentation.

Test Creation Script
To create an autocomplete test from a set of terms:

  • Create a source .txt file in scripts/
  • Each line of the source file should be a distinct test case string that's expected to pass against the autocomplete endpoint with a valid layer: 'address' property
  • Run node scripts/create-json.js [filepath] to generate the .json file
  • Edit the name parameter in the generated test file
  • Manually move the file into test_cases/
You can’t perform that action at this time.