Errors while running javascript unittest with karma-jasmine

已查看 18 次
跳至第一个未读帖子

Anand R.C

未读,
2018年3月6日 07:15:432018/3/6
收件人 General Open edX discussion
Hi,
I am trying to run the JavaScript unit tests. I followed steps mentioned here: https://github.com/edx/edx-platform/blob/master/docs/testing.rst
On running the command : 'paver test_js_run -s lms'
I am getting below error- the same error appears repeatedly many times. Has anyone encountered same error? Do I have to install some more karma-jamine packages? Any help is highly appreciated.

Stack Trace of error:

 ✗ can switch to view as a student
    Error: 'afterEach' should only be used in 'describe' function in /edx/app/edxapp/edx-platform/node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 1117)
    fakeRequests@/edx/app/edxapp/edx-platform/lms/static/edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers.js:87
    @/edx/app/edxapp/edx-platform/lms/static/lms/js/spec/preview/preview_factory_spec.js:50

Firefox 28.0.0 (Linux 0.0.0) Preview Factory can switch to view as a student FAILED
    Error: 'afterEach' should only be used in 'describe' function in /edx/app/edxapp/edx-platform/node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 1117)
    fakeRequests@/edx/app/edxapp/edx-platform/lms/static/edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers.js:87
    @/edx/app/edxapp/edx-platform/lms/static/lms/js/spec/preview/preview_factory_spec.js:50
    ✗ can switch to view as a content group
    Error: 'afterEach' should only be used in 'describe' function in /edx/app/edxapp/edx-platform/node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 1117)
    fakeRequests@/edx/app/edxapp/edx-platform/lms/static/edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers.js:87
    @/edx/app/edxapp/edx-platform/lms/static/lms/js/spec/preview/preview_factory_spec.js:70

Firefox 28.0.0 (Linux 0.0.0) Preview Factory can switch to view as a content group FAILED
    Error: 'afterEach' should only be used in 'describe' function in /edx/app/edxapp/edx-platform/node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 1117)
    fakeRequests@/edx/app/edxapp/edx-platform/lms/static/edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers.js:87
    @/edx/app/edxapp/edx-platform/lms/static/lms/js/spec/preview/preview_factory_spec.js:70
    ✗ can switch to masquerade as a specific student
    Error: 'afterEach' should only be used in 'describe' function in /edx/app/edxapp/edx-platform/node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 1117)
    fakeRequests@/edx/app/edxapp/edx-platform/lms/static/edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers.js:87
    @/edx/app/edxapp/edx-platform/lms/static/lms/js/spec/preview/preview_factory_spec.js:93

Firefox 28.0.0 (Linux 0.0.0) Preview Factory can switch to masquerade as a specific student FAILED
    Error: 'afterEach' should only be used in 'describe' function in /edx/app/edxapp/edx-platform/node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 1117)


Thanks,
Anand

回复全部
回复作者
转发
0 个新帖子