static ok()

in x-test.js [999:1013]


  static ok(context, stepId) {
    const step = context.state.steps[stepId];
    switch (step.type) {
      case 'test-end':
        return XTestRoot.childOk(context, { type: 'test', testId: step.testId }, { todoOk: true });
      case 'describe-end':
        return XTestRoot.childOk(context, { type: 'describe', describeId: step.describeId }, { todoOk: true });
      case 'it':
        return XTestRoot.childOk(context, { type: 'it', itId: step.itId });
      case 'coverage':
        return XTestRoot.childOk(context, { type: 'coverage', coverageId: step.coverageId });
      default:
        throw new Error(`Unexpected type "${step.type}".`);
    }
  }