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

test(atomic): add tests to binding decorators #4911

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

y-lakhdar
Copy link
Contributor

Copy link

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 243.9 243.9 0
commerce 355.2 355.2 0
search 415.1 415.1 0
insight 406.3 406.3 0
recommendation 256.2 256.2 0
ssr 409 409 0
ssr-commerce 373 373 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

expect(renderSpy).toHaveBeenCalledTimes(initialRenderCalls + 1);
});

it('should not call the original render function', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could group this test and the two that follow it under the same describe

describe('when there is an error', () => {
  it('should not call the original render function', async () => {
    // ...
  });
  it('should console log the error message', async () => {
    // ...
  })
  it('should render the error message', async () => {
    // ...
  });
});

packages/atomic/src/decorators/bind-state.spec.ts Outdated Show resolved Hide resolved
packages/atomic/src/decorators/bind-state.spec.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@alexprudhomme alexprudhomme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to adjust the atomic and angular scripts to ignore spec.ts files because they are trying to add all of your test elements 😆

Co-authored-by: Frederic Beaudoin <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants