Skip to content

improvement(test-util): use more sensitive language for less privileged #1615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"vuepress-theme-vue": "^1.0.3",
"vuex": "^3.0.1",
"webpack": "^3.0.1",
"webpack-node-externals": "^1.6.0"
"webpack-node-externals": "^2.5.0"
},
"devDependencies": {
"@commitlint/cli": "^8.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/create-instance/patch-create-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
CREATE_ELEMENT_ALIAS
} from 'shared/consts'

const isWhitelisted = (el, whitelist) => resolveComponent(el, whitelist)
const isAllowlisted = (el, allowlist) => resolveComponent(el, allowlist)
const isAlreadyStubbed = (el, stubs) => stubs.has(el)

function shouldExtend(component, _Vue) {
Expand All @@ -36,10 +36,10 @@ function createStubIfNeeded(shouldStub, component, _Vue, el) {
}
}

function shouldNotBeStubbed(el, whitelist, modifiedComponents) {
function shouldNotBeStubbed(el, allowlist, modifiedComponents) {
return (
(typeof el === 'string' && isReservedTag(el)) ||
isWhitelisted(el, whitelist) ||
isAllowlisted(el, allowlist) ||
isAlreadyStubbed(el, modifiedComponents)
)
}
Expand Down
4 changes: 2 additions & 2 deletions test/setup/webpack.test.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const rules = [].concat(
}
)
const externals = nodeExternals({
// we need to whitelist both `create-instance` and files in `shared` package. Otherwise webpack won't bundle them in the test dev env
whitelist: [
// we need to allowlist both `create-instance` and files in `shared` package. Otherwise webpack won't bundle them in the test dev env
allowlist: [
'@vue/test-utils',
'@vue/server-test-utils',
'create-instance',
Expand Down
6 changes: 3 additions & 3 deletions test/specs/mounting-options/stubs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describeWithShallowAndMount('options.stub', mountingMethod => {
expect(wrapper.html()).to.contain('</div>')
})

it('stubs components with dummy when passed as an array', () => {
it('stubs components with place holder when passed as an array', () => {
const ComponentWithGlobalComponent = {
render: h => h('div', [h('registered-component')])
}
Expand Down Expand Up @@ -230,7 +230,7 @@ describeWithShallowAndMount('options.stub', mountingMethod => {
expect(wrapper.html()).to.contain('<child-component-stub>')
})

it('stubs components with dummy which has name when passed a boolean', () => {
it('stubs components with place holder which has name when passed a boolean', () => {
const ComponentWithGlobalComponent = {
render: h => h('div', [h('registered-component')])
}
Expand All @@ -243,7 +243,7 @@ describeWithShallowAndMount('options.stub', mountingMethod => {
expect(wrapper.html()).to.contain('<registered-component-stub>')
})

it('stubs components with dummy when passed as an array', () => {
it('stubs components with place holder when passed as an array', () => {
const ComponentWithGlobalComponent = {
render: h => h('registered-component')
}
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13175,9 +13175,9 @@ webpack-merge@^4.1.2:
dependencies:
lodash "^4.17.5"

webpack-node-externals@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.6.0.tgz#232c62ec6092b100635a3d29d83c1747128df9bd"
webpack-node-externals@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-2.5.0.tgz#8d50f3289c71bc2b921a8da228e0b652acc503f1"

webpack-serve@^1.0.2:
version "1.0.4"
Expand Down