René's URL Explorer Experiment


Title: Unit tests run with --bundle does not bundle 3rd party libraries · Issue #4477 · NativeScript/nativescript-cli · GitHub

Open Graph Title: Unit tests run with --bundle does not bundle 3rd party libraries · Issue #4477 · NativeScript/nativescript-cli

X Title: Unit tests run with --bundle does not bundle 3rd party libraries · Issue #4477 · NativeScript/nativescript-cli

Description: Environment ✔ Getting NativeScript components versions information... ✔ Component nativescript has 5.4.0-2019-03-21-13075 version and is up to date. ✔ Component tns-core-modules has 5.3.0 version and is up to date. ✔ Component tns-androi...

Open Graph Description: Environment ✔ Getting NativeScript components versions information... ✔ Component nativescript has 5.4.0-2019-03-21-13075 version and is up to date. ✔ Component tns-core-modules has 5.3.0 version a...

X Description: Environment ✔ Getting NativeScript components versions information... ✔ Component nativescript has 5.4.0-2019-03-21-13075 version and is up to date. ✔ Component tns-core-modules has 5.3.0 version a...

Opengraph URL: https://github.com/NativeScript/nativescript-cli/issues/4477

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unit tests run with --bundle does not bundle 3rd party libraries","articleBody":"**Environment**\r\n✔ Getting NativeScript components versions information...\r\n✔ Component nativescript has 5.4.0-2019-03-21-13075 version and is up to date.\r\n✔ Component tns-core-modules has 5.3.0 version and is up to date.\r\n✔ Component tns-android has 5.3.0 version and is up to date.\r\n✔ Component tns-ios has 5.3.0 version and is up to date.\r\n\r\n**Describe the bug**\r\nWebpack test bundle does not include 3rd party libraries. We're trying to unit test some of our library code that uses the `@microstates/union`. This works when the app is built, but when we try to run the unit tests, they fail with the error:\r\n\r\n```\r\nTypeError: undefined is not an object (evaluating 'modules[moduleId].call')\r\n```\r\n\r\nWhich indicates that the microstate library is not bundled at all. Manually inspecting the built `vendor.js`, and `bundle.js` confirms that this is the case.\r\n\r\n\r\n**To Reproduce**\r\n1. import a 3rd party library from within a unit test case. You don't even have to try and use it, just log it to the console.\r\n2. run `yarn test ios --bundle`\r\n\r\n**Expected behavior**\r\n1. it resolves the module and dependencies from the `node_modules` directory and includes it in your application's `vendor.js` bundle.\r\n2. in this case, it should have the `microstates` and `@microstates/union` modules since they are being imported by our bluetooth library.\r\n\r\n**Sample project**\r\n- Use the `cl/blueteeth` branch from this application https://github.com/resideo-platform/exemplar/tree/cl/blueteeth\r\n- Here is the build output for the test target https://gist.github.com/cowboyd/fb05257a428b508c0f0e5cfd928f59f3\r\n\r\n","author":{"url":"https://github.com/cowboyd","@type":"Person","name":"cowboyd"},"datePublished":"2019-03-27T19:16:40Z","url":"https://github.com/NativeScript/nativescript-cli/issues/4477"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9552ae9c-5bd5-7cd7-ca76-d8e692fa2eea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8FD8:269AD9:2A42E9E:3870247:6B01C045
html-safe-nonce67c69fef2dd21d85066faeb5e3a428b9c42c7163263465301437168a316f3175
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkQ4OjI2OUFEOToyQTQyRTlFOjM4NzAyNDc6NkIwMUMwNDUiLCJ2aXNpdG9yX2lkIjoiNjg0NTA3NDMwMTI0NzQwNjE0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf511afe038b00e77fa66730e6019947f2aa9fb3190f4c829aea09bc39dbd7291
hovercard-subject-tagissue:426139761
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-cli/4477/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8e3f0d412e367b2e7a4af53a591dfa3d7691ee434cf9fc49e94620971d8b502d/NativeScript/nativescript-cli/issues/4477
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8e3f0d412e367b2e7a4af53a591dfa3d7691ee434cf9fc49e94620971d8b502d/NativeScript/nativescript-cli/issues/4477
og:image:altEnvironment ✔ Getting NativeScript components versions information... ✔ Component nativescript has 5.4.0-2019-03-21-13075 version and is up to date. ✔ Component tns-core-modules has 5.3.0 version a...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecowboyd
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id21347346
octolytics-dimension-repository_nwoNativeScript/nativescript-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21347346
octolytics-dimension-repository_network_root_nwoNativeScript/nativescript-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/nativescript-cli/issues/4477#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fnativescript-cli%2Fissues%2F4477
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fnativescript-cli%2Fissues%2F4477
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2Fnativescript-cli
Reloadhttps://github.com/NativeScript/nativescript-cli/issues/4477
Reloadhttps://github.com/NativeScript/nativescript-cli/issues/4477
Reloadhttps://github.com/NativeScript/nativescript-cli/issues/4477
NativeScripthttps://github.com/NativeScript
nativescript-clihttps://github.com/NativeScript/nativescript-cli
Codehttps://github.com/NativeScript/nativescript-cli
Issues357 (357)https://github.com/NativeScript/nativescript-cli/issues
Pull requests38 (38)https://github.com/NativeScript/nativescript-cli/pulls
Actionshttps://github.com/NativeScript/nativescript-cli/actions
Projectshttps://github.com/NativeScript/nativescript-cli/projects
Security and qualityhttps://github.com/NativeScript/nativescript-cli/security
Insightshttps://github.com/NativeScript/nativescript-cli/insights
https://github.com/NativeScript/nativescript-cli
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/nativescript-cli/issues/4477
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/nativescript-cli/issues/4477
Unit tests run with --bundle does not bundle 3rd party librarieshttps://github.com/NativeScript/nativescript-cli/issues/4477#top
https://github.com/Fatme
bughttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22bug%22
unit testinghttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22unit%20testing%22
5.3.2https://github.com/NativeScript/nativescript-cli/milestone/93
https://github.com/cowboyd
cowboydhttps://github.com/cowboyd
on Mar 27, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#issue-426139761
https://github.com/resideo-platform/exemplar/tree/cl/blueteethhttps://github.com/resideo-platform/exemplar/tree/cl/blueteeth
https://gist.github.com/cowboyd/fb05257a428b508c0f0e5cfd928f59f3https://gist.github.com/cowboyd/fb05257a428b508c0f0e5cfd928f59f3
https://github.com/Fatme
Fatmehttps://github.com/Fatme
on Mar 27, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#issuecomment-477324690
@cowboydhttps://github.com/cowboyd
https://github.com/NativeScript/nativescript-dev-webpack/blob/master/unit-testing-config-loader.js#L5https://github.com/NativeScript/nativescript-dev-webpack/blob/master/unit-testing-config-loader.js#L5
https://github.com/cowboyd
cowboydhttps://github.com/cowboyd
on Mar 27, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#issuecomment-477350971
Fatmehttps://github.com/Fatme
on Mar 29, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2238485643
Fatmehttps://github.com/Fatme
bughttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22bug%22
on Mar 29, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2238485732
Fatmehttps://github.com/Fatme
5.3.1https://github.com/NativeScript/nativescript-cli/milestone/90
on Mar 29, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2238485800
Fatmehttps://github.com/Fatme
unit testinghttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22unit%20testing%22
on Mar 29, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2238488538
Fatmehttps://github.com/Fatme
on Mar 29, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2238492896
fix: respect files property from karma.config on `tns test android --…https://github.com/NativeScript/nativescript-dev-webpack/commit/a223b2b6b3b085699abb10e3453c26b0a903651d
a223b2bhttps://github.com/NativeScript/nativescript-dev-webpack/commit/a223b2b6b3b085699abb10e3453c26b0a903651d
fix: respect files property from karma.config on `tns test android --…https://github.com/NativeScript/nativescript-dev-webpack/commit/7034a9727e85e87ce1dc36d060661fd7f8bc178f
7034a97https://github.com/NativeScript/nativescript-dev-webpack/commit/7034a9727e85e87ce1dc36d060661fd7f8bc178f
endarovahttps://github.com/endarova
in progresshttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22in%20progress%22
on Apr 1, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2242378617
rosen-vladimirovhttps://github.com/rosen-vladimirov
5.3.1https://github.com/NativeScript/nativescript-cli/milestone/90
5.3.2https://github.com/NativeScript/nativescript-cli/milestone/93
on Apr 3, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2248720485
Fatmehttps://github.com/Fatme
on Apr 3, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2249079681
fix: respect files property from karma.config on `tns test android --…https://github.com/NativeScript/nativescript-dev-webpack/commit/259d807f355879eeafabc28c2af67e9afaf2ea66
259d807https://github.com/NativeScript/nativescript-dev-webpack/commit/259d807f355879eeafabc28c2af67e9afaf2ea66
fix: add support for ts files on test command when `--bundle` is prov…https://github.com/NativeScript/nativescript-dev-webpack/commit/558d1e53d6a58dbd30db3d99cb1a83f13ec36fd6
558d1e5https://github.com/NativeScript/nativescript-dev-webpack/commit/558d1e53d6a58dbd30db3d99cb1a83f13ec36fd6
dtopuzovhttps://github.com/dtopuzov
on Apr 4, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2253929020
fix: add support for ts files on test command when `--bundle` is prov…https://github.com/NativeScript/nativescript-dev-webpack/commit/bd4fa9cd01c75c4eb464a5f4b2f301328181e95a
bd4fa9chttps://github.com/NativeScript/nativescript-dev-webpack/commit/bd4fa9cd01c75c4eb464a5f4b2f301328181e95a
Fatmehttps://github.com/Fatme
on Apr 5, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2254845620
chore: merge release into master (#850)https://github.com/NativeScript/nativescript-dev-webpack/commit/ab6bbf6019fe2fa795f95802e685711f395d256b
#850https://github.com/NativeScript/nativescript-dev-webpack/pull/850
ab6bbf6https://github.com/NativeScript/nativescript-dev-webpack/commit/ab6bbf6019fe2fa795f95802e685711f395d256b
chore: merge release into master (#852)https://github.com/NativeScript/nativescript-dev-webpack/commit/4e69936fc5e8f8beed72b22d0f5e16fbd70e2a9c
#852https://github.com/NativeScript/nativescript-dev-webpack/pull/852
4e69936https://github.com/NativeScript/nativescript-dev-webpack/commit/4e69936fc5e8f8beed72b22d0f5e16fbd70e2a9c
Fatmehttps://github.com/Fatme
ready for testhttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22ready%20for%20test%22
in progresshttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22in%20progress%22
on Apr 12, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2271288383
miroslavaivanovahttps://github.com/miroslavaivanova
in testinghttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22in%20testing%22
ready for testhttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22ready%20for%20test%22
on Apr 12, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2271578986
Fatmehttps://github.com/Fatme
on Apr 12, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2272083719
chore: merge release into master (#860)https://github.com/NativeScript/nativescript-dev-webpack/commit/5c37a1a897837212270c28fe5be9d0512cd8a7bd
#860https://github.com/NativeScript/nativescript-dev-webpack/pull/860
5c37a1ahttps://github.com/NativeScript/nativescript-dev-webpack/commit/5c37a1a897837212270c28fe5be9d0512cd8a7bd
miroslavaivanovahttps://github.com/miroslavaivanova
completedhttps://github.com/NativeScript/nativescript-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 12, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2272099072
miroslavaivanovahttps://github.com/miroslavaivanova
in testinghttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22in%20testing%22
on Apr 12, 2019https://github.com/NativeScript/nativescript-cli/issues/4477#event-2272099075
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/nativescript-cli/issues/4477
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/nativescript-cli/issues/4477
Fatmehttps://github.com/Fatme
bughttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22bug%22
unit testinghttps://github.com/NativeScript/nativescript-cli/issues?q=state%3Aopen%20label%3A%22unit%20testing%22
5.3.2https://github.com/NativeScript/nativescript-cli/milestone/93
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.