Skip to content

Commit

Permalink
feat(test): 移除 history 依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed May 24, 2024
1 parent 676b725 commit f1887e0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import $, {Ret} from 'miaoxing';
import {req, url, history} from '@mxjs/app';
import {req, url} from '@mxjs/app';
import axios from '@mxjs/axios';

export function createPromise() {
Expand All @@ -23,7 +23,6 @@ export function createPromise() {
}

const originalLocation = window.location;
const originalHistoryLocation = history.location;

export function setUrl(path) {
const url = new URL(path, 'http://localhost/');
Expand All @@ -42,12 +41,10 @@ export function setUrl(path) {
reload: () => {
},
};
history.location = window.location;
}

export function resetUrl() {
window.location = originalLocation;
history.location = originalHistoryLocation;
}

export function bootstrap() {
Expand Down

0 comments on commit f1887e0

Please sign in to comment.