How to use the @foal/core.getPath function in @foal/core

To help you get started, we’ve selected a few @foal/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FoalTS / foal / packages / cli / src / generate / templates / controller / controller.spec.empty.ts View on Github external
it('should handle requests at GET /.', () => {
      strictEqual(getHttpMethod(/* upperFirstCamelName */Controller, 'foo'), 'GET');
      strictEqual(getPath(/* upperFirstCamelName */Controller, 'foo'), '/');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.ts View on Github external
it('should handle requests at GET /:testFooBarId.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'getById'), 'GET');
      strictEqual(getPath(TestFooBarController, 'getById'), '/:testFooBarId');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.current-dir.ts View on Github external
it('should handle requests at GET /:testFooBarId.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'getById'), 'GET');
      strictEqual(getPath(TestFooBarController, 'getById'), '/:testFooBarId');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.ts View on Github external
it('should handle requests at PUT /.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'put'), 'PUT');
      strictEqual(getPath(TestFooBarController, 'put'), '/');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.current-dir.ts View on Github external
it('should handle requests at PATCH /.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'patch'), 'PATCH');
      strictEqual(getPath(TestFooBarController, 'patch'), '/');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.current-dir.ts View on Github external
it('should handle requests at PATCH /:testFooBarId.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'patchById'), 'PATCH');
      strictEqual(getPath(TestFooBarController, 'patchById'), '/:testFooBarId');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.ts View on Github external
it('should handle requests at POST /:testFooBarId.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'postById'), 'POST');
      strictEqual(getPath(TestFooBarController, 'postById'), '/:testFooBarId');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.current-dir.ts View on Github external
it('should handle requests at DELETE /.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'delete'), 'DELETE');
      strictEqual(getPath(TestFooBarController, 'delete'), '/');
    });
github FoalTS / foal / packages / examples / src / app / controllers / view.controller.spec.ts View on Github external
it('should handle requests at GET /.', () => {
      strictEqual(getHttpMethod(ViewController, 'home'), 'GET');
      strictEqual(getPath(ViewController, 'home'), '/');
    });
github FoalTS / foal / packages / examples / src / app / controllers / product.controller.spec.ts View on Github external
it('should handle requests at GET /.', () => {
      strictEqual(getHttpMethod(ProductController, 'get'), 'GET');
      strictEqual(getPath(ProductController, 'get'), '/');
    });