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

Chaining backend.use calls #69

Merged
merged 1 commit into from
Aug 25, 2016
Merged

Chaining backend.use calls #69

merged 1 commit into from
Aug 25, 2016

Conversation

droganov
Copy link
Contributor

To allow:
backend
.use( "submit", function( shareRequest, next ){
console.log( "submit" )
next()
}
)
.use( "query", function( shareRequest, next ){
console.log( "query" )
next()
}
)

To allow
backend
    .use( "submit", function( shareRequest, next ){
        console.log( "submit" )
        next()
      }
    )
    .use( "query", function( shareRequest, next ){
        console.log( "query" )
        next()
      }
    )
@droganov droganov changed the title Chaining support Chaining support for backend.use Mar 10, 2016
@droganov droganov changed the title Chaining support for backend.use Chaining backend.use calls Mar 10, 2016
@nateps
Copy link
Contributor

nateps commented Mar 24, 2016

Reasonable given that people may be used to this from Express.

Can you please add a unit test? PRs for any new feature or bug fixes should include a unit test.

@droganov
Copy link
Contributor Author

Please give me a time to pick it up, I'm new to this travis stuff

@droganov
Copy link
Contributor Author

@nateps am I adding use test to sharedb/test/db.js?

@nateps
Copy link
Contributor

nateps commented Apr 27, 2016

the test files basically correspond to each feature. appropriate test should be added to: https://github.com/share/sharedb/blob/master/test/middleware.js

You don't need to mess around with Travis; simply run the unit tests locally with npm test, which will use mocha locally.

@nateps nateps merged commit eb8f34b into share:master Aug 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants