bazelbuild / bazelbuild/rules_closure

mockControl.$waitAndVerifyAll() isn't recognized as a method

Open
#316 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
159
Forks
111
PR merge metrics
No merged PRs in 30d

Description

This is a method of mock control defined [here](https://github.com/google/closure-library/blob/master/closure/goog/testing/mockcontrol.js#L89) and documented [here](https://google.github.io/closure-library/api/goog.testing.MockControl.html). But when I try to use this within a closure_js_test, I get `...mockControl$$.$$waitAndVerifyAll$ is not a function`.

When I look at `bazel-out/k8-fastbuild/bin/external/io_bazel_rules_closure/closure/library/testing/mockcontrol.i.js` I don't see it defined on the prototype for MockControl. My other calls to MockControl (`$resetAll()`, `$tearDown()`, `$replayAll()`, `$verifyAll()`, `createFunctionMock(...)`) all work fine.

My MockControl import is `const MockControl = goog.require('goog.testing.MockControl');`.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure in a closure_js_test, then compare closure/goog/testing/mockcontrol.js with bazel-out/k8-fastbuild/bin/external/io_bazel_rules_closure/closure/library/testing/mockcontrol.i.js. Check how MockControl is imported and generated for the build; done means $waitAndVerifyAll() is present and callable like the other MockControl methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.