Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database adapter test suite? #19

Open
mxstbr opened this issue Jan 13, 2017 · 2 comments
Open

Database adapter test suite? #19

mxstbr opened this issue Jan 13, 2017 · 2 comments

Comments

@mxstbr
Copy link
Member

mxstbr commented Jan 13, 2017

Should we have a test suite new database adapter can run against to check compatibility with the spec? Currently writing docs for it, I feel like that'd make it much easier.

This might require having a repo setup with the tests and a bunch of other niceties (e.g. linting) which developers can simply clone to write a new adapter.

@relekang
Copy link
Member

I think it would be really awesome if we could do something like the following.

import { adapterTestSuite } from 'micro-analytics' // or some other package that is published from this repo
import adapter from './index'

adapterTestSuite({
   adapter,
   beforeAll: () => { },
   afterAll: () => {},
   before: () => {},
   after: () => {},
})

This would make it much easier for adapters to test against new versions.

@mxstbr
Copy link
Member Author

mxstbr commented Jan 13, 2017

That's a really good idea! We could just let our tests run through with a passed in adapter?! That would also test atomicity and stuff. (#20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants