Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
This repository was archived by the owner on May 1, 2025. It is now read-only.

store name not set #789

@GipHub123

Description

@GipHub123

Is this a regression?

No

Description

name -property not properly set.

`
@StoreConfig({name: 'company', idKey: 'businessId'})
@Injectable({providedIn: 'root'})
export class CompanyStore extends EntityStore<CompanyState, Company> {
constructor() {
super();
}
}

`

`
describe('CompanyStore', () => {

let store: CompanyStore;

beforeEach(async () => {
  store = new CompanyStore();
});

it('config', () => {
  expect(store.config.name).toEqual('company'); <-- This test case fails
  expect(store.config.idKey).toEqual('businessId');
});

});
`

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

CompanyStore
    × config
      Chrome Headless 97.0.4692.71 (Windows 10)
    Error: Expected undefined to equal 'company'.

Please provide the environment you discovered this bug in

$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 13.1.3
Node: 16.13.0
Package Manager: npm 8.1.0
OS: win32 x64

Angular: 13.1.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... google-maps, language-service, material
... material-date-fns-adapter, platform-browser
... platform-browser-dynamic, platform-server, router

Package                                    Version
--------------------------------------------------------------------
@angular-devkit/architect                  0.1301.3
@angular-devkit/build-angular              13.1.3
@angular-devkit/core                       13.1.3
@angular-devkit/schematics                 13.1.3
@angular/cli                               13.1.3
@nguniversal/builders                      13.0.1
@nguniversal/express-engine                13.0.1
@nguniversal/module-map-ngfactory-loader   v8.2.6
@schematics/angular                        13.1.3
rxjs                                       7.4.0
typescript                                 4.5.4

Anything else?

No response

Do you want to create a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions