Code Monkey home page Code Monkey logo

Comments (4)

ilyas-shah avatar ilyas-shah commented on May 22, 2024 1

thanks!

from appy.

JKHeadley avatar JKHeadley commented on May 22, 2024

This is actually a rest-hapi issue (similar to this one JKHeadley/rest-hapi#14). If I understand your question correctly, you would like to have sub-directories beneath the api directories to help organize the files. This is currently not supported, however I will add a new feature request to rest-hapi and reference this issue. It shouldn't be too difficult to implement, however I'm currently working on a major refactor of rest-hapi so it might take some time before I can get to it.

from appy.

ilyas-shah avatar ilyas-shah commented on May 22, 2024

if that is the case, it would be great to see that feature in Rest-Hapi, and that will be helpful to write unit tests for the individual endpoints. Also for now what do you suggest for Rest-Hapi endpoint unit testing?

from appy.

JKHeadley avatar JKHeadley commented on May 22, 2024

@ilyas-shah sorry for just getting back to you on this. To test generated endpoints you can use RestHapi.testHelper.mockInjection combined with server.inject to assist in mocking endpoint requests. You can see an example here:
https://github.com/JKHeadley/rest-hapi/blob/09d2045edc90adbb464ca5f79f935a40d9a181ee/tests/e2e/end-to-end.tests.js#L551

from appy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.