Skip to content

bug: Wrong use of postMessage.test #26

Description

@devdevx

Bug Report

Version:

Latest

Current behavior:

The generated JS tests use postMessage that didn't exists.

try {
    json = pm.response.json();
    // pm.environment.set('var', json.data.variable);
} catch (e) {
    postMessage.test("JSON expected", function() {
        pm.expect(json, "responseBody not JSON").not.to.be.null;
    });
}

Expected behavior:

The generated JS tests use pm instead of postMessage.

try {
    json = pm.response.json();
    // pm.environment.set('var', json.data.variable);
} catch (e) {
    pm.test("JSON expected", function() {
        pm.expect(json, "responseBody not JSON").not.to.be.null;
    });
}

Steps to reproduce:

Generate a test

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions