Skip to content

Commit

Permalink
fix: remote tests folder from gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
chihab committed Nov 21, 2024
1 parent 4fdd971 commit 55639e7
Show file tree
Hide file tree
Showing 11 changed files with 316 additions and 894 deletions.
1 change: 0 additions & 1 deletion examples/nx-workspace-old/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.nx
test-results
tests
playwright-report
tests-examples
32 changes: 16 additions & 16 deletions examples/nx-workspace-old/apps/ng-app-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@
},
"private": true,
"dependencies": {
"@angular/animations": "next",
"@angular/common": "next",
"@angular/compiler": "next",
"@angular/core": "next",
"@angular/forms": "next",
"@angular/localize": "next",
"@angular/platform-browser": "next",
"@angular/platform-browser-dynamic": "next",
"@angular/platform-server": "next",
"@angular/router": "next",
"@angular/ssr": "next",
"@angular/animations": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/localize": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/platform-server": "^19.0.0",
"@angular/router": "^19.0.0",
"@angular/ssr": "^19.0.0",
"express": "^4.21.0",
"rxjs": "~7.8.1",
"tslib": "^2.7.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "next",
"@angular/build": "next",
"@angular/cli": "next",
"@angular/router": "next",
"@angular/compiler-cli": "next",
"@angular-devkit/build-angular": "^19.0.0",
"@angular/build": "^19.0.0",
"@angular/cli": "^19.0.0",
"@angular/router": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@dotenv-run/core": "workspace:^1.3.6",
"@dotenv-run/jest-angular": "workspace:^0.1.1",
"jest-preset-angular": "^14.0.0",
Expand Down
7 changes: 7 additions & 0 deletions examples/nx-workspace-old/apps/ng-app-cli/tests/app.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle('10');
await expect(page.locator('h1')).toHaveText('production');
});
7 changes: 7 additions & 0 deletions examples/nx-workspace/apps/ng-app-cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "ng-app-cli",
"private": true,
"scripts": {
"test:esm": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js"
}
}
1 change: 0 additions & 1 deletion examples/nx-workspace/apps/ng-app-cli/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"styles": ["apps/ng-app-cli/src/styles.css"],
"scripts": [],
"server": "apps/ng-app-cli/src/main.server.ts",
"prerender": true,
"ssr": {
"entry": "apps/ng-app-cli/server.ts"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { Component } from '@angular/core';
templateUrl: './app.component.html',
})
export class AppComponent {
title = import.meta.env.NODE_ENV;
title = 'Title: ' + import.meta.env.NODE_ENV;
}
2 changes: 2 additions & 0 deletions examples/nx-workspace/apps/ng-app-cli/src/main.server.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import '@ngx-env/builder/runtime';

import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { config } from './app/app.config.server';
Expand Down
4 changes: 4 additions & 0 deletions examples/nx-workspace/apps/ng-app-cli/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import 'jest-preset-angular/setup-jest.mjs';

// import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone/index.mjs';
// setupZoneTestEnv();

import { env } from '@dotenv-run/core';
env({ root: '../../..', files: ['.env', '.env.app'] });
5 changes: 4 additions & 1 deletion examples/nx-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "@nx-workspace/source",
"version": "0.0.0",
"license": "MIT",
"scripts": {},
"scripts": {
"test": "NODE_ENV=test nx run-many -t test:esm",
"build": "NODE_ENV=dev nx run-many -t build"
},
"private": true,
"dependencies": {
"@angular/animations": "~18.2.0",
Expand Down
18 changes: 9 additions & 9 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"glob": "^10.4.5"
},
"devDependencies": {
"@angular/build": "next",
"@angular-devkit/architect": "next",
"@angular-devkit/build-angular": "next",
"@angular-devkit/core": "next",
"@angular-devkit/schematics": "next",
"@angular/router": "next",
"@angular/animations": "next",
"@angular/common": "next",
"@angular/platform-browser": "next",
"@angular/build": "^19.0.0",
"@angular-devkit/architect": "^0.1900.0",
"@angular-devkit/build-angular": "^19.0.0",
"@angular-devkit/core": "^19.0.0",
"@angular-devkit/schematics": "^19.0.0",
"@angular/router": "^19.0.0",
"@angular/animations": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@dotenv-run/core": "workspace:^1.3.6",
"cpy": "^8.1.2",
"karma": "^6.4.4",
Expand Down
1,131 changes: 266 additions & 865 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 55639e7

Please sign in to comment.