Skip to content

Commit

Permalink
Fix wrongful store on testing suite (#2285)
Browse files Browse the repository at this point in the history
* Fix store on testing suite

* update changelog
  • Loading branch information
bz888 authored Mar 5, 2024
1 parent bf34103 commit a0afd59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/node-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Fix missing incrememnt keys on `_metadata` table (#2283)
- Fixed unexpected `store` on testing suite Entity (#2285)

### Added
- Support for Full Text Search (#2280)

Expand Down
6 changes: 4 additions & 2 deletions packages/node-core/src/indexer/test.runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ export class TestRunner<A, SA, B, DS> {
if (!actualEntity) {
failedAttributes.push(`\t\tExpected entity was not found`);
} else {
const attributes = actualEntity;
Object.keys(attributes).map((attr) => {
Object.keys(actualEntity).forEach((attr) => {
// EntityClass has private store on it, don't need to check it.
if (attr === 'store') return;

const expectedAttr = (expectedEntity as Record<string, any>)[attr] ?? null;
const actualAttr = (actualEntity as Record<string, any>)[attr] ?? null;

Expand Down

0 comments on commit a0afd59

Please sign in to comment.