Skip to content

Error: givens: given must be called inside a describe in #46

@vjustov

Description

@vjustov

Hello, I'm working on an angular project that is using jasmine through karma,
when i try to use givens i get the error in the title.
by changing the regex that are used to evaluate the context to: /(jasmine\\.js|jasmine\/lib\/loader\.js)/ and /Env\.describe|Env\/this.describe/ respectively the test seems to work.

getContextInfo@http://localhost:9876/_karma_webpack_/vendor.js:137425:21
given@http://localhost:9876/_karma_webpack_/vendor.js:137493:46
88403/</<@http://localhost:9876/_karma_webpack_/main.js:8172:14
32600/</ZoneDelegate.prototype.invoke@http://localhost:9876/_karma_webpack_/polyfills.js:414:30
32600/</Zone.prototype.run@http://localhost:9876/_karma_webpack_/polyfills.js:174:47
wrapDescribeInZone/<@http://localhost:9876/_karma_webpack_/vendor.js:169990:33
addSpecsToSuite@http://localhost:9876/absolute/Users/vjustov/some-project/node_modules/karma-jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js?b9e399d056ab3608dfb7a9a60a397876081d58cd:1991:25
Env/this.describe@http://localhost:9876/absolute/Users/vjustov/some-project/node_modules/karma-jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js?b9e399d056ab3608dfb7a9a60a397876081d58cd:1956:22
58991/</</</jasmineEnv[methodName]@http://localhost:9876/_karma_webpack_/vendor.js:169895:42
describe@http://localhost:9876/absolute/Users/vjustov/some-project/node_modules/karma-jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js?b9e399d056ab3608dfb7a9a60a397876081d58cd:7727:18
88403/<@http://localhost:9876/_karma_webpack_/main.js:8170:13
32600/</ZoneDelegate.prototype.invoke@http://localhost:9876/_karma_webpack_/polyfills.js:414:30
32600/</Zone.prototype.run@http://localhost:9876/_karma_webpack_/polyfills.js:174:47
wrapDescribeInZone/<@http://localhost:9876/_karma_webpack_/vendor.js:169990:33
addSpecsToSuite@http://localhost:9876/absolute/Users/vjustov/some-project/node_modules/karma-jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js?b9e399d056ab3608dfb7a9a60a397876081d58cd:1991:25
Env/this.fdescribe@http://localhost:9876/absolute/Users/vjustov/some-project/node_modules/karma-jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js?b9e399d056ab3608dfb7a9a60a397876081d58cd:1979:22
58991/</</</jasmineEnv[methodName]@http://localhost:9876/_karma_webpack_/vendor.js:169895:42
fdescribe@http://localhost:9876/absolute/Users/vjustov/some-project/node_modules/karma-jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js?b9e399d056ab3608dfb7a9a60a397876081d58cd:7758:18
88403@http://localhost:9876/_karma_webpack_/main.js:8169:10
__webpack_require__@http://localhost:9876/_karma_webpack_/main.js:16424:42
webpackContext@http://localhost:9876/_karma_webpack_/main.js:16363:9
74097@http://localhost:9876/_karma_webpack_/main.js:10434:16
__webpack_require__@http://localhost:9876/_karma_webpack_/main.js:16424:42
__webpack_exports__<@http://localhost:9876/_karma_webpack_/main.js:16745:102
__webpack_require__.O@http://localhost:9876/_karma_webpack_/main.js:16463:23
@http://localhost:9876/_karma_webpack_/main.js:16746:53
@http://localhost:9876/_karma_webpack_/main.js:16748:12

I am trying to provide a greenfield sandbox to replicate the bug, but so far haven't been able

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions