@avelardelarosa/core-util 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avelardelarosa/core-util",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Librería de utilidades comunes para servicios backend desarrollados con NestJS",
5
5
  "author": "Alexander Junior Velarde La Rosa <avelardelarosa@gmail.com>",
6
6
  "private": false,
@@ -1,22 +0,0 @@
1
- import { Test, TestingModule } from '@nestjs/testing';
2
- import { AppController } from './app.controller';
3
- import { AppService } from './app.service';
4
-
5
- describe('AppController', () => {
6
- let appController: AppController;
7
-
8
- beforeEach(async () => {
9
- const app: TestingModule = await Test.createTestingModule({
10
- controllers: [AppController],
11
- providers: [AppService],
12
- }).compile();
13
-
14
- appController = app.get<AppController>(AppController);
15
- });
16
-
17
- describe('root', () => {
18
- it('should return "Hello World!"', () => {
19
- expect(appController.getHello()).toBe('Hello World!');
20
- });
21
- });
22
- });
@@ -1,12 +0,0 @@
1
- import { Controller, Get } from '@nestjs/common';
2
- import { AppService } from './app.service';
3
-
4
- @Controller()
5
- export class AppController {
6
- constructor(private readonly appService: AppService) {}
7
-
8
- @Get()
9
- getHello(): string {
10
- return this.appService.getHello();
11
- }
12
- }
package/src/app.module.ts DELETED
@@ -1,10 +0,0 @@
1
- import { Module } from '@nestjs/common';
2
- import { AppController } from './app.controller';
3
- import { AppService } from './app.service';
4
-
5
- @Module({
6
- imports: [],
7
- controllers: [AppController],
8
- providers: [AppService],
9
- })
10
- export class AppModule {}
@@ -1,8 +0,0 @@
1
- import { Injectable } from '@nestjs/common';
2
-
3
- @Injectable()
4
- export class AppService {
5
- getHello(): string {
6
- return 'Hello World!';
7
- }
8
- }
package/src/main.ts DELETED
@@ -1,8 +0,0 @@
1
- import { NestFactory } from '@nestjs/core';
2
- import { AppModule } from './app.module';
3
-
4
- async function bootstrap() {
5
- const app = await NestFactory.create(AppModule);
6
- await app.listen(process.env.PORT ?? 3000);
7
- }
8
- bootstrap();
@@ -1,25 +0,0 @@
1
- import { Test, TestingModule } from '@nestjs/testing';
2
- import { INestApplication } from '@nestjs/common';
3
- import * as request from 'supertest';
4
- import { App } from 'supertest/types';
5
- import { AppModule } from './../src/app.module';
6
-
7
- describe('AppController (e2e)', () => {
8
- let app: INestApplication<App>;
9
-
10
- beforeEach(async () => {
11
- const moduleFixture: TestingModule = await Test.createTestingModule({
12
- imports: [AppModule],
13
- }).compile();
14
-
15
- app = moduleFixture.createNestApplication();
16
- await app.init();
17
- });
18
-
19
- it('/ (GET)', () => {
20
- return request(app.getHttpServer())
21
- .get('/')
22
- .expect(200)
23
- .expect('Hello World!');
24
- });
25
- });
@@ -1,9 +0,0 @@
1
- {
2
- "moduleFileExtensions": ["js", "json", "ts"],
3
- "rootDir": ".",
4
- "testEnvironment": "node",
5
- "testRegex": ".e2e-spec.ts$",
6
- "transform": {
7
- "^.+\\.(t|j)s$": "ts-jest"
8
- }
9
- }