Skip to content

0dataapp/spec-check

 
 

Repository files navigation

spec-check

remoteStorage REST API validator.

https://spec-check.0data.app

The spec version to test comes from the webfinger response by default, but you can also use the browser version to say "test that this server conforms to version X".

Mocha has a grep option to filter tests in the browser, for example public folder with no token.

Development

Install Node.js and npm, then install the dependencies:

npm i

Configure environment

name description
SERVER_URL server root URL (like https://kosmos.org)
ACCOUNT_HANDLE username of test account (like tony)
TOKEN_SCOPE (optional) scope/category to test (defaults to api-test-suite)
SPEC_VERSION (optional) draft version number (like 22)
TOKEN_READ_WRITE OAuth token with read/write access to the specified TOKEN_SCOPE
TOKEN_READ_ONLY OAuth token with read-only access to the specified TOKEN_SCOPE
TOKEN_GLOBAL OAuth token with read/write access to the root folder
  1. Create a remoteStorage test account on the server you'd like to verify.
  2. Copy .env.example to .env to set SERVER_URL and ACCOUNT_HANDLE from the previous step
  3. Visit the browser version above or run the local command below to generate the corresponding OAuth tokens.

Testing

npm test

Create an alternative environments (like .env.kosmos) and run them with

ENV=kosmos npm test

Local

Start the static server:

npm start

then visit http://localhost:8080.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • JavaScript 88.2%
  • HTML 6.9%
  • CSS 4.2%
  • Shell 0.7%