Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions modules/schematics/jest.config.ts

This file was deleted.

14 changes: 5 additions & 9 deletions modules/schematics/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
},
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "modules/schematics/jest.config.ts",
"runInBand": true,
"passWithNoTests": false
},
"outputs": ["{workspaceRoot}/coverage/modules/schematics"]
},
"build-package": {
"executor": "@nx/js:tsc",
"options": {
Expand Down Expand Up @@ -83,6 +74,11 @@
]
},
"outputs": ["{workspaceRoot}/dist/modules/schematics"]
},
"test": {
"executor": "@analogjs/vitest-angular:test",
"dependsOn": ["build"],
"outputs": ["{workspaceRoot}/coverage/modules/schematics"]
}
}
}
10 changes: 5 additions & 5 deletions modules/schematics/src/action/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Action Schematic api should create api actions 1`] = `
exports[`Action Schematic > api > should create api actions 1`] = `
"import { createActionGroup, emptyProps, props } from '@ngrx/store';

export const FooActions = createActionGroup({
Expand All @@ -14,7 +14,7 @@ export const FooActions = createActionGroup({
"
`;

exports[`Action Schematic should create an action with the defined prefix 1`] = `
exports[`Action Schematic > should create an action with the defined prefix 1`] = `
"import { createActionGroup, emptyProps, props } from '@ngrx/store';

export const FooActions = createActionGroup({
Expand All @@ -28,7 +28,7 @@ export const FooActions = createActionGroup({
"
`;

exports[`Action Schematic should create api actions (load, success, error) when the api flag is set 1`] = `
exports[`Action Schematic > should create api actions (load, success, error) when the api flag is set 1`] = `
"import { createActionGroup, emptyProps, props } from '@ngrx/store';

export const FooActions = createActionGroup({
Expand All @@ -42,7 +42,7 @@ export const FooActions = createActionGroup({
"
`;

exports[`Action Schematic should define actions using createActionGroup 1`] = `
exports[`Action Schematic > should define actions using createActionGroup 1`] = `
"import { createActionGroup, emptyProps, props } from '@ngrx/store';

export const FooActions = createActionGroup({
Expand Down
3 changes: 1 addition & 2 deletions modules/schematics/src/action/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import {
defaultWorkspaceOptions,
defaultAppOptions,
} from '@ngrx/schematics-core/testing';
import { capitalize } from '../../schematics-core/utility/strings';

describe('Action Schematic', () => {
const schematicRunner = new SchematicTestRunner(
'@ngrx/schematics',
path.join(__dirname, '../../collection.json')
path.join(process.cwd(), 'dist/modules/schematics/collection.json')
);
const defaultOptions: ActionOptions = {
name: 'foo',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`component-store should import into a specified module when the module provided 1`] = `
exports[`component-store > should import into a specified module when the module provided 1`] = `
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

Expand All @@ -24,7 +24,7 @@ export class AppModule { }
"
`;

exports[`component-store should inject the component store correctly into the spec 1`] = `
exports[`component-store > should inject the component store correctly into the spec 1`] = `
"import { FooStore } from './foo.store';

describe('FooStore', () => {
Expand All @@ -37,7 +37,7 @@ describe('FooStore', () => {
"
`;

exports[`component-store should not be provided into the module by default 1`] = `
exports[`component-store > should not be provided into the module by default 1`] = `
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

Expand All @@ -59,7 +59,7 @@ export class AppModule { }
"
`;

exports[`component-store should register the component store in the provided component 1`] = `
exports[`component-store > should register the component store in the provided component 1`] = `
"import { Component, signal } from '@angular/core';
import { FooStore } from './foo/foo.store';

Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/src/component-store/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
describe('component-store', () => {
const schematicRunner = new SchematicTestRunner(
'@ngrx/schematics',
path.join(__dirname, '../../collection.json')
path.join(process.cwd(), 'dist/modules/schematics/collection.json')
);

const defaultOptions: ComponentStoreOptions = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Container Schematic display-block should be disabled by default 1`] = `""`;
exports[`Container Schematic > display-block > should be disabled by default 1`] = `""`;

exports[`Container Schematic display-block should create add style if true 1`] = `
exports[`Container Schematic > display-block > should create add style if true 1`] = `
":host {
display: block;
}
"
`;

exports[`Container Schematic should import Store into the component 1`] = `
exports[`Container Schematic > should import Store into the component 1`] = `
"import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import * as fromStore from '../reducers';
Expand All @@ -26,7 +26,7 @@ export class Foo {
"
`;

exports[`Container Schematic should respect the state option if not provided 1`] = `
exports[`Container Schematic > should respect the state option if not provided 1`] = `
"import { Component } from '@angular/core';
import { Store } from '@ngrx/store';

Expand All @@ -42,7 +42,7 @@ export class Foo {
"
`;

exports[`Container Schematic should update the component spec 1`] = `
exports[`Container Schematic > should update the component spec 1`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';

import { FooComponent } from './foo.component';
Expand Down Expand Up @@ -77,7 +77,7 @@ describe('FooComponent', () => {
"
`;

exports[`Container Schematic should use StoreModule if integration test 1`] = `
exports[`Container Schematic > should use StoreModule if integration test 1`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';

import { FooComponent } from './foo.component';
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('FooComponent', () => {
"
`;

exports[`Container Schematic standalone should be standalone by default 1`] = `
exports[`Container Schematic > standalone > should be standalone by default 1`] = `
"import { Component } from '@angular/core';
import { Store } from '@ngrx/store';

Expand All @@ -129,7 +129,7 @@ export class Foo {
"
`;

exports[`Container Schematic standalone should create a non-standalone component if false 1`] = `
exports[`Container Schematic > standalone > should create a non-standalone component if false 1`] = `
"import { Component } from '@angular/core';
import { Store } from '@ngrx/store';

Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/src/container/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
describe('Container Schematic', () => {
const schematicRunner = new SchematicTestRunner(
'@ngrx/schematics',
path.join(__dirname, '../../collection.json')
path.join(process.cwd(), 'dist/modules/schematics/collection.json')
);

const defaultOptions: ContainerOptions = {
Expand Down
8 changes: 4 additions & 4 deletions modules/schematics/src/data/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Data Schematic should create a model interface 1`] = `
exports[`Data Schematic > should create a model interface 1`] = `
"export interface Foo {
id?: unknown;
}
"
`;

exports[`Data Schematic should create a service class 1`] = `
exports[`Data Schematic > should create a service class 1`] = `
"import { Injectable } from '@angular/core';
import {
EntityCollectionServiceBase,
Expand All @@ -24,7 +24,7 @@ export class FooService extends EntityCollectionServiceBase<Foo> {
"
`;

exports[`Data Schematic should create a spec class 1`] = `
exports[`Data Schematic > should create a spec class 1`] = `
"import { TestBed } from '@angular/core/testing';
import {
EntityCollectionServiceElementsFactory
Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/src/data/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
describe('Data Schematic', () => {
const schematicRunner = new SchematicTestRunner(
'@ngrx/schematics',
path.join(__dirname, '../../collection.json')
path.join(process.cwd(), 'dist/modules/schematics/collection.json')
);
const defaultOptions: DataOptions = {
name: 'foo',
Expand Down
32 changes: 16 additions & 16 deletions modules/schematics/src/effect/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Effect Schematic feature effects should add an effect to the existing registered feature effects 1`] = `
exports[`Effect Schematic > feature effects > should add an effect to the existing registered feature effects 1`] = `
"
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
Expand All @@ -24,7 +24,7 @@ import { FooEffects } from './foo/foo.effects';
"
`;

exports[`Effect Schematic feature effects should create an effect that describes a source of actions within a feature 1`] = `
exports[`Effect Schematic > feature effects > should create an effect that describes a source of actions within a feature 1`] = `
"import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';

Expand All @@ -50,7 +50,7 @@ export class FooEffects {
"
`;

exports[`Effect Schematic feature effects should not add an effect to registered effects defined with a variable 1`] = `
exports[`Effect Schematic > feature effects > should not add an effect to registered effects defined with a variable 1`] = `
"
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
Expand All @@ -74,7 +74,7 @@ import { FooEffects } from './foo/foo.effects';
"
`;

exports[`Effect Schematic feature effects should still register the feature effect module with an effect with the minimal flag 1`] = `
exports[`Effect Schematic > feature effects > should still register the feature effect module with an effect with the minimal flag 1`] = `
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

Expand All @@ -99,7 +99,7 @@ export class AppModule { }
"
`;

exports[`Effect Schematic root effects should add an effect to the empty array of registered effects 1`] = `
exports[`Effect Schematic > root effects > should add an effect to the empty array of registered effects 1`] = `
"
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
Expand All @@ -122,7 +122,7 @@ import { FooEffects } from './foo/foo.effects';
"
`;

exports[`Effect Schematic root effects should add an effect to the existing registered root effects 1`] = `
exports[`Effect Schematic > root effects > should add an effect to the existing registered root effects 1`] = `
"
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
Expand All @@ -145,7 +145,7 @@ import { FooEffects } from './foo/foo.effects';
"
`;

exports[`Effect Schematic root effects should create an effect that does not define a source of actions within the root 1`] = `
exports[`Effect Schematic > root effects > should create an effect that does not define a source of actions within the root 1`] = `
"import { Injectable } from '@angular/core';
import { Actions, createEffect } from '@ngrx/effects';

Expand All @@ -160,7 +160,7 @@ export class FooEffects {
"
`;

exports[`Effect Schematic root effects should register the root effect in the provided module 1`] = `
exports[`Effect Schematic > root effects > should register the root effect in the provided module 1`] = `
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

Expand All @@ -185,7 +185,7 @@ export class AppModule { }
"
`;

exports[`Effect Schematic root effects should register the root effect module without effect with the minimal flag 1`] = `
exports[`Effect Schematic > root effects > should register the root effect module without effect with the minimal flag 1`] = `
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

Expand All @@ -209,7 +209,7 @@ export class AppModule { }
"
`;

exports[`Effect Schematic should add prefix to the effect 1`] = `
exports[`Effect Schematic > should add prefix to the effect 1`] = `
"import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { catchError, map, concatMap } from 'rxjs/operators';
Expand Down Expand Up @@ -239,7 +239,7 @@ export class FooEffects {
"
`;

exports[`Effect Schematic should create an api effect that describes a source of actions within a feature 1`] = `
exports[`Effect Schematic > should create an api effect that describes a source of actions within a feature 1`] = `
"import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { catchError, map, concatMap } from 'rxjs/operators';
Expand Down Expand Up @@ -269,7 +269,7 @@ export class FooEffects {
"
`;

exports[`Effect Schematic should group and nest the effect within a feature 1`] = `
exports[`Effect Schematic > should group and nest the effect within a feature 1`] = `
"import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';

Expand All @@ -295,7 +295,7 @@ export class FooEffects {
"
`;

exports[`Effect Schematic should import into a specified module when provided 1`] = `
exports[`Effect Schematic > should import into a specified module when provided 1`] = `
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

Expand All @@ -320,7 +320,7 @@ export class AppModule { }
"
`;

exports[`Effect Schematic should inject the effect service correctly within the spec 1`] = `
exports[`Effect Schematic > should inject the effect service correctly within the spec 1`] = `
"import { TestBed } from '@angular/core/testing';
import { provideMockActions } from '@ngrx/effects/testing';
import { Observable } from 'rxjs';
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('FooEffects', () => {
"
`;

exports[`Effect Schematic should not be provided by default 1`] = `
exports[`Effect Schematic > should not be provided by default 1`] = `
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/src/effect/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
describe('Effect Schematic', () => {
const schematicRunner = new SchematicTestRunner(
'@ngrx/schematics',
path.join(__dirname, '../../collection.json')
path.join(process.cwd(), 'dist/modules/schematics/collection.json')
);

const defaultOptions: EffectOptions = {
Expand Down
Loading
Loading