by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 17 06:34
    github-actions[bot] labeled #1167
  • Jun 17 06:34
    rhpijnacker opened #1167
  • Jun 08 21:26
    msssk commented #1165
  • Jun 08 21:24
    msssk commented #1165
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 opened #1166
  • Jun 08 13:25
    jason0x43 commented #1165
  • Jun 06 15:50

    jason0x43 on oclif-test

    (compare)

  • Jun 05 01:22

    jason0x43 on 4.8.7

    (compare)

  • Jun 05 01:22

    jason0x43 on 4.8

    Updating metadata for 4.8.7 Updating source version to 4.8.… (compare)

  • Jun 05 00:54
    jason0x43 commented #80
  • Jun 05 00:54
    jason0x43 commented #80
  • Jun 05 00:54
    jason0x43 labeled #80
  • Jun 04 15:07

    jason0x43 on 4.8

    chore: update Intern config sch… chore: update schema Improve h… feat: add support for 'internLo… and 1 more (compare)

  • Jun 04 14:33

    jason0x43 on monorepo

    refactor: monorepo - pnpm-base… test: add browser envs to leadf… (compare)

  • Jun 04 14:14

    jason0x43 on monorepo

    refactor: monorepo - pnpm-base… (compare)

  • Jun 04 13:34

    jason0x43 on gh-pages

    Update assets (compare)

Dylan Staley
@dstaley
awesome! Intern 5, or a minor release?
Jason Cheatham
@jason0x43
Definitely 5, maybe a minor release (depending on how long 5 is taking)
Guido Boshouwers
@GARMBoshouwers
If I want to check code coverage of functional tests, do I need to set the coverage variable to the .js files used in the web page?
rhpijnacker
@rhpijnacker
Is there a way to have the test reporter include the time it takes to execute beforeEach/afterEach?
I'm trying to pinpoint tests that take too long to run, but it looks like only the time spent in the actual testcase is reported.
Jason Cheatham
@jason0x43
@GARMBoshouwers you'd set the coverage variable in the same way as for unit tests, and you would need to load your test pages through Intern's test server (e.g. localhost:9000). Coverage requires source files to be instrumented, and instrumentation for browser tests happens when files are served by the test server.
@rhpijnacker Not currently; time is only recorded for the test itself. I can see that being a useful stat to collect, though.
rhpijnacker
@rhpijnacker
Would that be an easy change to make?
Every now and then, the BrowserStack run on IE11 does not put the window full-screen. I'm passing "resolution": "1280x1024" to the environment, but nothing else. Do I need some extra setting to get the window maximized?
Jason Cheatham
@jason0x43
Sending a resolution capability to BrowserStack sets the desktop resolution. To maximize the IE window itself, you'd need to use the maximizeWindow Leadfoot command.
Jason Cheatham
@jason0x43
Adding timing for before/after each probably wouldn't be difficult, although how it gets collected and reported would need some thought. Like, should Intern remember the time for each beforeEach call, or should it average them for a suite? Should those results be kept as Suite properties, or should Intern just include that info in events emitted when a beforeEach (afterEach, etc) finishes?
dave-hart
@dave-hart

Hi, I have a custom reporter that listens to the testEnd event for some functional tests

  @eventHandler()
  testEnd(test: Test) {

but on running, this event seems to get fired during initialisation before the browser even loads (it also hits after an actual test when I would expect it)

Is this as expected behaviour?

dave-hart
@dave-hart
I am answering my own question, it is because of skipped tests
Khobab
@khobabc
Hello Good People.
I have some questions that I could not find answer to anywhere. I thought I should ask here.
Jason Cheatham
@jason0x43
Hi! This is a great place to ask questions, assuming they're about Intern. :smile:
Khobab
@khobabc
They sure are :-)
we are using Intern 4 with dojo and we have started using TypeScript with dojo typings so tests are in ts.
Khobab
@khobabc
and now when we do npm run tsc to compile type script we see following errors in compilation.

node_modules/@theintern/digdug/BrowserStackTunnel.d.ts:2:36 - error TS2307: Cannot find module '@theintern/common'.

2 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/digdug/interfaces.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 export { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/digdug/SeleniumTunnel.d.ts:3:36 - error TS2307: Cannot find module '@theintern/common'.

3 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/digdug/Tunnel.d.ts:2:66 - error TS2307: Cannot find module '@theintern/common'.

2 import { Evented, EventObject, Handle, CancellablePromise } from '@theintern/common';
                                                                   ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Command.d.ts:3:36 - error TS2307: Cannot find module '@theintern/common'.

3 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Element.d.ts:2:36 - error TS2307: Cannot find module '@theintern/common'.

2 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/interfaces.d.ts:2:36 - error TS2307: Cannot find module '@theintern/common'.

2 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Server.d.ts:1:52 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise, RequestOptions } from '@theintern/common';
                                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Session.d.ts:4:36 - error TS2307: Cannot find module '@theintern/common'.

4 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@types/istanbul-lib-instrument/index.d.ts:8:30 - error TS2307: Cannot find module 'source-map'.

8 import { RawSourceMap } from 'source-map';
                               ~~~~~~~~~~~~

node_modules/@types/istanbul-lib-source-maps/index.d.ts:8:30 - error TS2307: Cannot find module 'source-map'.

8 import { RawSourceMap } from 'source-map';
                               ~~~~~~~~~~~~

node_modules/intern/lib/BenchmarkTest.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/channels/Base.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/executors/Executor.d.ts:2:44 - error TS2307: Cannot find module '@theintern/common'.

2 import { Handle, CancellablePromise } from '@theintern/common';
                                             ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/executors/Node.d.ts:4:36 - error TS2307: Cannot find module '@theintern/common'.

4 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/RemoteSuite.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/reporters/Benchmark.d.ts:22:22 - error TS2694: Namespace '"C:/Users/Khobab/Documents/webapps/node_modules/intern/lib/reporters/Benchmark"' has no exported member 'Times'.

22     times: Benchmark.Times;
                        ~~~~~

node_modules/intern/lib/Server.d.ts:5:24 - error TS2307: Cannot find module '@theintern/common'.

5 import { Handle } from '@theintern/common';
                         ~~~~~~~~~~~~
I am not sure how we can fix these. Any help would be much appreciated.
Jason Cheatham
@jason0x43
What version of Intern are you using?
Khobab
@khobabc
"intern": "4.8.0",
But I have also tried with 4.8.4 and it does not matter
Jason Cheatham
@jason0x43
Do you have node_modules/@theintern/common?
Khobab
@khobabc
yes, it exists.
Jason Cheatham
@jason0x43
What does your tsconfig look like? In particular, what is the value for moduleResolution?
Khobab
@khobabc
{
  "compilerOptions": {
    "noImplicitAny": true,
    "noImplicitUseStrict": true,
    "noEmitOnError": false,
    "module": "amd",
    "moduleResolution": "classic",
    "target": "es5",
    "sourceMap": true,
    "experimentalDecorators": true,
    "types": ["intern"],
    "baseUrl": ".",
    "paths": {
        "abc/*": ["src/abc/*"],
        "def/*": ["src/def/*"]
    }
  },
  "exclude": [
    "node_modules"
  ],
  "include": [
    "src/**/*",
    "tests/unit/**/*"
  ],
  "files": [
    "./node_modules/dojo-typings/dojo/1.11/index.d.ts",
    "./node_modules/dojo-typings/dojo/1.11/modules.d.ts",
    "./node_modules/dojo-typings/dijit/1.11/index.d.ts",
    "./node_modules/dojo-typings/dijit/1.11/modules.d.ts",
    "./node_modules/dojo-typings/dojox/1.11/index.d.ts",
    "./node_modules/dojo-typings/dojox/1.11/modules.d.ts",
    "./node_modules/dojo-typings/dojox/1.11/html/entities.d.ts",
    "./node_modules/dojo-typings/custom/dgrid/1.1/dgrid.d.ts",
    "./node_modules/dojo-typings/custom/dstore/1.1/dstore.d.ts"
  ]
}
You can see tsconfig above.
I do not have separate files for src and tests, there is only one file at the base.
Jason Cheatham
@jason0x43
Can you set moduleResolution to node? (Will that work with your app?)
Khobab
@khobabc
I have tried that too just to check but does not think it works. I can try that again.
ah, btw it worked with moduleResolution node.
Not sure why it did not work earlier.
I have to check with my lead if this module resolution would work and smoke test the app.
Jason Cheatham
@jason0x43
:thumbsup:
Khobab
@khobabc
Just one more question, is there a way to not change the module resolution and resolve this?
Jason Cheatham
@jason0x43

You may be able to use paths, like

{
  "compilerOptions": {
    "paths": {
      "@theintern/common": ["node_modules/@theintern/common/index"],
      "source-map": ["node_modules/source-map/source-map"]
    }
}

However, you may still run into issues because modules published through npm are going to assume node-based module resolution.

Khobab
@khobabc
ahaan.
Thank you very much for your help.
Dylan Staley
@dstaley
Did 4.8.4 break compatibility with older versions of Chrome? It looks like my GitHub workflows are failing on the 4.8.4 upgrade saying ChromeDriver only supports Chrome 83. GitHub Actions use Chrome 81.
Jason Cheatham
@jason0x43

Funny, someone else just pinged me because GHA recently updated to Chrome 83 and their tests started failing. :grinning: Intern's policy is to track the current stable versions of webdrivers by default. If you need to pin to a specific driver version, you can do that using tunnelOptions.drivers:

{
  "tunnelOptions": {
    "drivers": [
      { "name": "chrome", "version": "81..." }
    ]
  }
}

We can actually make that a bit easier with GHA, because (at least according to their release notes) they publish something to a CHROMEWEBDRIVER environment variable in the container. I haven't checked to see what that contains, though (path to an exe, version number, ...).

Dylan Staley
@dstaley
oh huh maybe it's failing because Chrome is actually v83 and ChromeDriver can't properly detect it?
Jason Cheatham
@jason0x43
4.8.4 uses the chromedriver for Chrome 81 by default, so you'd need to pin to a v83 chromedriver. Intern 4.8.5 (published yesterday) checks for updated webdriver versions when you run tests, so it should stay up-to-date.
Dylan Staley
@dstaley
Oh, sorry, it's actually v4.8.5 that's breaking
This version of ChromeDriver only supports Chrome version 83
Jason Cheatham
@jason0x43
Ah, yeah, being on 4.8.5 would make more sense with that error.
It looks like you're using a Windows environment?
Dylan Staley
@dstaley
Yup, the Windows 2019 environment, which as of seven days ago is using chrome 81 (at least according to this https://github.com/actions/virtual-environments/blame/master/images/win/Windows2019-Readme.md#L573)
Jason Cheatham
@jason0x43
Hmm...the release notes for the most recent release (3 days ago) says it's on Chrome 83. (https://github.com/actions/virtual-environments/releases/tag/win19%2F20200524.1)