# All files / src resetFixture.ts

100% Statements 23/23
100% Branches 4/4
100% Functions 4/4
100% Lines 23/23

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    241x
    1x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
    1x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
    5x
     import superagent from 'superagent';

    export async function setup() {
      const APIPATH = 'http://localhost:55001/plone';
      const data =
        '<?xml version="1.0"?><methodCall><methodName>run_keyword</methodName><params><param><value><string>remote_zodb_setup</string></value></param><param><value><array><data><value><string>plone.app.robotframework.testing.PLONE_ROBOT_TESTING</string></value></data></array></value></param></params></methodCall>';
      const request = superagent.post(`${APIPATH}/RobotRemote`);
      request.accept('text/xml');
      request.set('content-type', 'text/xml');
      request.send(data);
      return await request;
    }

    export async function teardown() {
      const APIPATH = 'http://localhost:55001/plone';
      const data =
        '<?xml version="1.0"?><methodCall><methodName>run_keyword</methodName><params><param><value><string>remote_zodb_teardown</string></value></param><param><value><array><data><value><string>plone.app.robotframework.testing.PLONE_ROBOT_TESTING</string></value></data></array></value></param></params></methodCall>';
      const request = superagent.post(`${APIPATH}/RobotRemote`);
      request.accept('text/xml');
      request.set('content-type', 'text/xml');
      request.send(data);
      return await request;
    }