question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having issues with unit tests

See original GitHub issue

Issue Description

Trying to write tests, but I get:

Can't bind to 'ngxPermissionsOnly' since it isn't a known property of 'div'. ("
    </div>
            </div>
                <div [ERROR ->]*ngxPermissionsOnly="['ADMIN', 'GUEST']" class="m-portlet__head-tools">
                    <ul class="nav nav-pil"): ng:///DashboardModule/DashboardComponent.html@35:10
Property binding ngxPermissionsOnly not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("
                    </div>
                </div>
                [ERROR ->]<div *ngxPermissionsOnly="['ADMIN', 'GUEST']" class="m-portlet__head-tools">
                    <ul class="nav na"): ng:///DashboardModule/DashboardComponent.html@35:5

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[x] Documentation issue or request

Current behavior

Expected behavior

Minimal reproduction of the problem with instructions

Environment


Angular version: X.Y.Z
ngx-permissions version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
msonnadcommented, Nov 22, 2018

Thanks, i am able to find the correct version now.

1reaction
AlexKhymenkocommented, Nov 22, 2018

@msonnad Hi You need to import in the module where You use it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What are your biggest problems with unit testing?
One issue with unit testing is the tendency to tie the test to the result of the code, not the code itself. In...
Read more >
Unit Testing: Advantages & Disadvantages - The QA Lead
Doing unit tests is essentially doing quality assurance of the code. It shows problems and bugs before the product has an integration test....
Read more >
The 7 Sins of Unit Testing - TestRail Blog
1. Slow Running Tests · 2. Writing Test with Lots of Assertions · 3. Peering into Private Methods · 4. Testing Externalities ·...
Read more >
What are some problems encountered while writing unit tests?
Since we make it mandatory to have all unit testing pass for any code commit, if unit test cases fails randomly, we have...
Read more >
Unit Testing: Is It Worth the Effort?
Even if you have the latest and greatest tools and infrastructure, unit testing will still require time and effort to create and maintain....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found