Skip to content

Commit 97fada0

Browse files
authored
Merge pull request #150 from cexbrayat/chore/repro-beta.16
repro: beta.16 regressions
2 parents c478782 + c62068f commit 97fada0

File tree

4 files changed

+52
-41
lines changed

4 files changed

+52
-41
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"ts-jest": "^25.0.0",
4141
"tsd": "0.11.0",
4242
"typescript": "^3.7.5",
43-
"vue": "^3.0.0-beta.15",
43+
"vue": "^3.0.0-beta.16",
4444
"vue-jest": "vuejs/vue-jest#next",
4545
"vuex": "^4.0.0-beta.1"
4646
},

src/stubs.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,17 @@ export function stubComponents(
7575
shallow: boolean = false
7676
) {
7777
transformVNodeArgs((args) => {
78+
const locallyRegisteredComponents = (args[0] as any).components as
79+
| Record<string, VNodeTypes>
80+
| undefined
81+
if (locallyRegisteredComponents) {
82+
for (const registrationName in locallyRegisteredComponents) {
83+
const component = locallyRegisteredComponents[registrationName]
84+
if (!component['name'] && !component['displayName']) {
85+
component['name'] = registrationName
86+
}
87+
}
88+
}
7889
const [nodeType, props, children, patchFlag, dynamicProps] = args
7990
const type = nodeType as VNodeTypes
8091
// args[0] can either be:

tests/shallowMount.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('shallowMount', () => {
2626
)
2727
})
2828

29-
it.only('stubs all components, but allows providing custom stub', () => {
29+
it('stubs all components, but allows providing custom stub', () => {
3030
const wrapper = mount(ComponentWithChildren, {
3131
shallow: true,
3232
global: {

yarn.lock

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,14 +1199,14 @@
11991199
estree-walker "^0.8.1"
12001200
source-map "^0.6.1"
12011201

1202-
1203-
version "3.0.0-beta.15"
1204-
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-beta.15.tgz#8710a8e3ba15ba1a8b62bd17609d26bd27fdcc45"
1205-
integrity sha512-NLNW7tAMHl8ybRgTPTIWLsi8aXHbFngY2x95eEHAdxhNasTY5NsgmQBBH9TBAUQEn6Wo8ybmuvQoNzgcw979Zg==
1202+
1203+
version "3.0.0-beta.17"
1204+
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-beta.17.tgz#92d75f5ae7a03c51694f439dc96939bde9a7074e"
1205+
integrity sha512-UHv7YFUremfSXf3CAeEoRZOX+n26IZQxFRwREw55spoMRjjpNIH+sSLQz3pwgTnClm90GlzRMzOFYTOQrzAnfQ==
12061206
dependencies:
12071207
"@babel/parser" "^7.8.6"
12081208
"@babel/types" "^7.8.6"
1209-
"@vue/shared" "3.0.0-beta.15"
1209+
"@vue/shared" "3.0.0-beta.17"
12101210
estree-walker "^0.8.1"
12111211
source-map "^0.6.1"
12121212

@@ -1218,13 +1218,13 @@
12181218
"@vue/compiler-core" "3.0.0-beta.12"
12191219
"@vue/shared" "3.0.0-beta.12"
12201220

1221-
1222-
version "3.0.0-beta.15"
1223-
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-beta.15.tgz#ee6dc9ae1dabb5c5c257d7cc20c5f3e95d5e5f4f"
1224-
integrity sha512-0qVaCosZ6XrkmlSOndGlNh33JQ2oao82uWxC/qw4QWBGm6a1DcKkZFIZFYLQWg5ZIcSrEQrR1VzUidBaZw9AIg==
1221+
1222+
version "3.0.0-beta.17"
1223+
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-beta.17.tgz#fa19ad2391cd78dcae121cfbeacf6cc3ebd4ff20"
1224+
integrity sha512-wj4egu6KzsJy1EG/MHgbEVfVH8oMIGoFqjwkbCyqE5G0uRPAPi0WYHY5lyjAU2gI7cfGxIcFx7UsWT5D9XH0/g==
12251225
dependencies:
1226-
"@vue/compiler-core" "3.0.0-beta.15"
1227-
"@vue/shared" "3.0.0-beta.15"
1226+
"@vue/compiler-core" "3.0.0-beta.17"
1227+
"@vue/shared" "3.0.0-beta.17"
12281228

12291229
"@vue/compiler-sfc@^3.0.0-beta.12":
12301230
version "3.0.0-beta.12"
@@ -1252,39 +1252,39 @@
12521252
"@vue/compiler-dom" "3.0.0-beta.12"
12531253
"@vue/shared" "3.0.0-beta.12"
12541254

1255-
1256-
version "3.0.0-beta.15"
1257-
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-beta.15.tgz#4ee0942783d7ff09acab5b8755706597ba6234f6"
1258-
integrity sha512-Xa0LG8RTNlPYsuqOBhhV03xKhMmuSU0vtKXoIi1yxp9gGU7ga/TMmnhELb66AiupiXdLJwRcdv00KhPF/2y0dA==
1255+
1256+
version "3.0.0-beta.17"
1257+
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-beta.17.tgz#582a0650d3ab5aad1cb15e0e4fdea1dbb1732877"
1258+
integrity sha512-LPpRAEljlrZjTwTmIxZNMePwTOapWXfAcDRMyFJ/L1MGumfyPl1jHflE8upcUKtUWpXt18+MpNywXwskpr4+4w==
12591259
dependencies:
1260-
"@vue/shared" "3.0.0-beta.15"
1260+
"@vue/shared" "3.0.0-beta.17"
12611261

1262-
1263-
version "3.0.0-beta.15"
1264-
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-beta.15.tgz#35c2ef61dadf07dfe9129dbea6fb8c1b88cc5bd6"
1265-
integrity sha512-jDkqSs1hsS9fRCgzah7VINafxWj7bYoDyweVuBqm6KPcHRfGkRZZxl2NltbbVaLH76Qvm4PPSnqGgEx7QtFSgg==
1262+
1263+
version "3.0.0-beta.17"
1264+
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-beta.17.tgz#400a977398cb1689e225d884077d2dae7ce1e6b4"
1265+
integrity sha512-HOud3nuNAxBPPM66Mj4NRomdbeqIdR5ofSB+JgRHn/gS+7C13A/ww1XsKkjN6IzE8VgeJ3XHEBHrtDvBRYPfcg==
12661266
dependencies:
1267-
"@vue/reactivity" "3.0.0-beta.15"
1268-
"@vue/shared" "3.0.0-beta.15"
1267+
"@vue/reactivity" "3.0.0-beta.17"
1268+
"@vue/shared" "3.0.0-beta.17"
12691269

1270-
1271-
version "3.0.0-beta.15"
1272-
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-beta.15.tgz#e3ce740c5e3766020719b174686bd65c75975c7e"
1273-
integrity sha512-161rUw1sWfbv51Ua8gKXaPc+seRJQcV+MLokTJtqYtNCajya0Mx6vdXJajBWqjDT8/Udx0sb7Wm/K/0DfGBUTw==
1270+
1271+
version "3.0.0-beta.17"
1272+
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-beta.17.tgz#a296ff81eebbaf7aa5d19cd76d595222f4636e48"
1273+
integrity sha512-FPV3fT8AFRQHuvjQ5/QxifU3LlMnyg1FzMHENedcu6lRrmUpnttexkOa51nZOrlFPI+Tz3mk297lohCp1QCMEA==
12741274
dependencies:
1275-
"@vue/runtime-core" "3.0.0-beta.15"
1276-
"@vue/shared" "3.0.0-beta.15"
1275+
"@vue/runtime-core" "3.0.0-beta.17"
1276+
"@vue/shared" "3.0.0-beta.17"
12771277
csstype "^2.6.8"
12781278

12791279
12801280
version "3.0.0-beta.12"
12811281
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-beta.12.tgz#cb7a2bb047919d2c944bf822032b0a8aa869ba1d"
12821282
integrity sha512-cA0DD3VFGYI76lbM90fAYXNJ9EmDNsm1tthO4FIY18DwziZKJWCfQBhEfHQd2skHcTE4OqH5eBxgsKEdn/LuGQ==
12831283

1284-
1285-
version "3.0.0-beta.15"
1286-
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-beta.15.tgz#77444ab234e229c3fdcc9f394678e167a55757af"
1287-
integrity sha512-wViILT5GgxMtnXVQ1xupj43wvnZ41g3NLWaBObs7l+eTxz5vq5yx72qH6HRpsfhR2Mg39jE0cfNLFEpC4lJIUQ==
1284+
1285+
version "3.0.0-beta.17"
1286+
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-beta.17.tgz#c9df723a3a3a39e47044ae8be60cce51c749ceb3"
1287+
integrity sha512-4vqmNjeY3prPbH2K9hKmXnzfU34ytT+Az971Ybc5WcjG6Vu+gEkXLHAQvQIoi9AYhCCuunvUi1r5IWFhGSHLww==
12881288

12891289
abab@^2.0.0, abab@^2.0.3:
12901290
version "2.0.3"
@@ -6007,14 +6007,14 @@ vue-jest@vuejs/vue-jest#next:
60076007
extract-from-css "^0.4.4"
60086008
ts-jest "^24.0.0"
60096009

6010-
vue@^3.0.0-beta.15:
6011-
version "3.0.0-beta.15"
6012-
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-beta.15.tgz#99f107534755d3a237b51fc1279c43af2fefde6e"
6013-
integrity sha512-KTmvfNpkvD6mao8vloqjUMjrHEivS1HZvHmYeHPRHqU2HRvNcrZuwXYvETt3dGOTu0Oj7zAWQXP+uZ34CW75sw==
6010+
vue@^3.0.0-beta.16:
6011+
version "3.0.0-beta.17"
6012+
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-beta.17.tgz#e361cfb18e3cb5576af27724fdb6e67e3fb45020"
6013+
integrity sha512-FrqKMCFbs3FHnYHf2uX7hkk0DKX+14SixX1vV5to8pwA97A55mrMmm+VqywRbPWfS2If9OByvhwuRL1+HRLY8g==
60146014
dependencies:
6015-
"@vue/compiler-dom" "3.0.0-beta.15"
6016-
"@vue/runtime-dom" "3.0.0-beta.15"
6017-
"@vue/shared" "3.0.0-beta.15"
6015+
"@vue/compiler-dom" "3.0.0-beta.17"
6016+
"@vue/runtime-dom" "3.0.0-beta.17"
6017+
"@vue/shared" "3.0.0-beta.17"
60186018

60196019
vuex@^4.0.0-beta.1:
60206020
version "4.0.0-beta.1"

0 commit comments

Comments
 (0)