summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/src/actions/pause/tests/skipPausing.spec.js
blob: 83006c3089c24a80e35e9e4cfd6cdc6eb7fd16db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */

import { actions, selectors, createStore } from "../../../utils/test-head";

describe("sources - pretty print", () => {
  it("returns a pretty source for a minified file", async () => {
    const client = { setSkipPausing: jest.fn() };
    const { dispatch, getState } = createStore(client);

    await dispatch(actions.toggleSkipPausing());
    expect(selectors.getSkipPausing(getState())).toBe(true);

    await dispatch(actions.toggleSkipPausing());
    expect(selectors.getSkipPausing(getState())).toBe(false);
  });
});