Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store name not set #789

Open
GipHub123 opened this issue Jan 14, 2022 · 0 comments
Open

store name not set #789

GipHub123 opened this issue Jan 14, 2022 · 0 comments

Comments

@GipHub123
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant