Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 20 02:22
    dependabot[bot] labeled #661
  • Jul 20 02:22
    dependabot[bot] opened #661
  • Jul 20 02:22

    dependabot[bot] on npm_and_yarn

    Bump terser from 4.8.0 to 4.8.1… (compare)

  • Apr 07 16:28
    shirblc commented #660
  • Apr 04 07:30
    squidfunk commented #660
  • Apr 04 07:28

    squidfunk on 1.0.9

    (compare)

  • Apr 04 07:25

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 04 07:24

    squidfunk on master

    Bump path-parse from 1.0.6 to 1… Merge pull request #652 from sq… (compare)

  • Apr 04 07:24
    squidfunk closed #652
  • Apr 04 07:24

    squidfunk on master

    Prepare 1.0.9 release (compare)

  • Apr 04 07:18

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 04 07:18
    dependabot[bot] closed #658
  • Apr 04 07:18

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 04 07:18
    dependabot[bot] closed #657
  • Apr 04 07:18
    dependabot[bot] edited #658
  • Apr 04 07:18
    dependabot[bot] edited #657
  • Apr 04 07:18
    dependabot[bot] commented #658
  • Apr 04 07:18
    dependabot[bot] commented #657
  • Apr 04 07:18

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 04 07:18

    dependabot[bot] on npm_and_yarn

    (compare)

Martin Donath
@squidfunk
Welcome to the karma-viewport gitter chat room. Feel free to post any questions.
Gerry Fletcher
@gerryfletch
Anyone around?
Martin Donath
@squidfunk
Hey, sure
Gerry Fletcher
@gerryfletch
I actually figured out the problem haha. Rubber ducked it. Don't worry :) nice library.
Martin Donath
@squidfunk
Could you elaborate? Maybe it's better to clarify the instructions, so other people don't run into your problem :-)
Chris Badalucco
@ChrisBadalucco
Hello, I'm curious if karma-viewport is supposed to be compatible with PhantomJS? I was able to get my tests working when run with Chrome but it doesn't seem like my viewport sizes are taking hold when I use PhantomJS in CI. Thanks
Martin Donath
@squidfunk
It should be, as it is with Chrome Headless, but I haven't tested. Can you provide a minimum reproducible and runnable scenario for debugging?
Chris Badalucco
@ChrisBadalucco
Thanks for the reply. I'll try and put something together when I get a chance
Martin Donath
@squidfunk
The latest karma-viewport release adds TypeScript typings and support for asynchronous breakpoint iteration (using a callback returning a Promise).
Chris Badalucco
@ChrisBadalucco
Hello, can you specify how to link karma-viewport using the typescript typings?
I see here Don't include the package using an import statement, but instead include its types via tsconfig.json or a reference within karma.conf.ts but I'm a bit new to typescript and not sure what exactly I need to do. Thanks
Chris Badalucco
@ChrisBadalucco

I've made progress, now I'm just looking for verification that what I've done is the best way.
Using an Angular Project:

tsconfig.json
|
src/
|__tsconfig.app.json
|__tsconfig.spec.json

inside tsconf.json:
"typeRoots": [ "node_modules/@types", ... ]

inside tsconfig.spec.json:
"types": [ "jasmine", "node", "karma-viewport" ]

This seems to work for me. Thanks in advance.

Martin Donath
@squidfunk
Yes, that's the way to go. The problem is that karma resolves the plugins automatically and they are not included, so the best thing is to define it in types as you have done, or use a reference tag. If somebody comes up with a better approach - I'm also new to TypeScript ;-) (3 months)