aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIndrajith K L2023-08-09 03:17:29 +0530
committerIndrajith K L2023-08-09 03:17:29 +0530
commitda7af92dcbbae9444ce9daf3fd278212d9cea4c7 (patch)
tree0c25dbd2c84e16d0f44844e94f70711e7770cb86 /test
downloadJournlr Backend-da7af92dcbbae9444ce9daf3fd278212d9cea4c7.tar.gz
Journlr Backend-da7af92dcbbae9444ce9daf3fd278212d9cea4c7.tar.bz2
Journlr Backend-da7af92dcbbae9444ce9daf3fd278212d9cea4c7.zip
initial commit with sample post urlHEADmaster
Diffstat (limited to 'test')
-rw-r--r--test/app.e2e-spec.ts24
-rw-r--r--test/jest-e2e.json9
2 files changed, 33 insertions, 0 deletions
diff --git a/test/app.e2e-spec.ts b/test/app.e2e-spec.ts
new file mode 100644
index 0000000..50cda62
--- /dev/null
+++ b/test/app.e2e-spec.ts
@@ -0,0 +1,24 @@
+import { Test, TestingModule } from '@nestjs/testing';
+import { INestApplication } from '@nestjs/common';
+import * as request from 'supertest';
+import { AppModule } from './../src/app.module';
+
+describe('AppController (e2e)', () => {
+ let app: INestApplication;
+
+ beforeEach(async () => {
+ const moduleFixture: TestingModule = await Test.createTestingModule({
+ imports: [AppModule],
+ }).compile();
+
+ app = moduleFixture.createNestApplication();
+ await app.init();
+ });
+
+ it('/ (GET)', () => {
+ return request(app.getHttpServer())
+ .get('/')
+ .expect(200)
+ .expect('Hello World!');
+ });
+});
diff --git a/test/jest-e2e.json b/test/jest-e2e.json
new file mode 100644
index 0000000..e9d912f
--- /dev/null
+++ b/test/jest-e2e.json
@@ -0,0 +1,9 @@
+{
+ "moduleFileExtensions": ["js", "json", "ts"],
+ "rootDir": ".",
+ "testEnvironment": "node",
+ "testRegex": ".e2e-spec.ts$",
+ "transform": {
+ "^.+\\.(t|j)s$": "ts-jest"
+ }
+}