mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
chore: various internal fixes (#6761)
This commit is contained in:
parent
124511f445
commit
e101acd132
6 changed files with 14 additions and 105 deletions
4
jest/snapshotPathNormalizer.js
vendored
4
jest/snapshotPathNormalizer.js
vendored
|
@ -11,6 +11,7 @@
|
|||
|
||||
const _ = require('lodash');
|
||||
const {escapePath} = require('@docusaurus/utils');
|
||||
const {version} = require('@docusaurus/core/package.json');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
@ -131,6 +132,9 @@ function normalizePaths(value) {
|
|||
.split(`<TEMP_DIR>${path.sep + homeRealRelativeToTemp}`)
|
||||
.join('<HOME_DIR>'), // untested
|
||||
|
||||
// Replace the Docusaurus version with a stub
|
||||
(val) => val.split(version).join('<CURRENT_VERSION>'),
|
||||
|
||||
// In case the CWD is escaped
|
||||
(val) => val.split(escapePath(cwd)).join('<PROJECT_ROOT>'),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue