helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix(ext/webgpu): Allow `depthClearValue` to be undefined when `depthLoadOp` is not "clear"

The current implemention would panic at `op_webgpu_command_encoder_begin_render_pass` with legal JavaScript code, because `GpuRenderPassDepthStencilAttachment` require `depth_clear_value` to always appear.

The current WebGPU specification says[^1]

> (depthClearValue is) Ignored if `depthLoadOp` is not "clear"

[^1]: https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue

The modification is tiny and easy to understand. Should I open a issue and/or add a unit test? 


Changed files:
filename: ext/webgpu/command_encoder.rs
patch: @@ -79,7 +79,7 @@ pub struct GpuRenderPassColorAttachment {
 #[serde(rename_all = "camelCase")]
 pub struct GpuRenderPassDepthStencilAttachment {
   view: ResourceId,
-  depth_clear_value: f32,
+  depth_clear_value: Option<f32>,
   depth_load_op: Option<wgpu_core::command::LoadOp>,
   depth_store_op: Option<wgpu_core::command::StoreOp>,
   depth_read_only: bool,
@@ -168,7 +168,9 @@ pub fn op_webgpu_command_encoder_begin_render_pass(
           store_op: attachment
             .depth_store_op
             .unwrap_or(wgpu_core::command::StoreOp::Store),
-          clear_value: attachment.depth_clear_value,
+          // In "01_webgpu.js", `depthLoadOp` is cheked to ensure its value is not "clear"
+          // when `depthClearValue` is undefined, so the default 0.0 doesn't matter.
+          clear_value: attachment.depth_clear_value.unwrap_or(0.0),
           read_only: attachment.depth_read_only,
         },
         stencil: wgpu_core::command::PassChannel {

filename: tests/unit/webgpu_test.ts
patch: @@ -496,6 +496,36 @@ Deno.test({
   device.destroy();
 });
 
+Deno.test({
+  ignore: isWsl || isLinuxOrMacCI,
+}, async function beginRenderPassWithoutDepthClearValue() {
+  const adapter = await navigator.gpu.requestAdapter();
+  assert(adapter);
+  const device = await adapter.requestDevice();
+  assert(device);
+
+  const encoder = device.createCommandEncoder();
+
+  const depthTexture = device.createTexture({
+    size: [256, 256],
+    format: "depth32float",
+    usage: GPUTextureUsage.RENDER_ATTACHMENT,
+  });
+  const depthView = depthTexture.createView();
+
+  const renderPass = encoder.beginRenderPass({
+    colorAttachments: [],
+    depthStencilAttachment: {
+      view: depthView,
+      depthLoadOp: "load",
+    },
+  });
+
+  assert(renderPass);
+
+  device.destroy();
+});
+
 async function checkIsWsl() {
   return Deno.build.os === "linux" && await hasMicrosoftProcVersion();
Repository: denoland/deno
Pull request: perf(cache): compile ts to js in parallel for `deno cache`

```
Benchmark 1: ../deno/deno_old cache main.ts
  Time (mean ± σ):     225.6 ms ±   6.5 ms    [User: 134.0 ms, System: 80.6 ms]
  Range (min … max):   219.2 ms … 237.2 ms    12 runs
 
Benchmark 2: ../deno/deno_new cache main.ts
  Time (mean ± σ):     168.7 ms ±   6.9 ms    [User: 234.3 ms, System: 167.2 ms]
  Range (min … max):   156.5 ms … 182.0 ms    16 runs
 
Summary
  ../deno/deno_new cache main.ts ran
    1.34 ± 0.07 times faster than ../deno/deno_old cache main.ts
% cat main.ts
import "https://deno.land/x/dax@0.22.0/mod.ts";
import "https://deno.land/x/dax@0.23.0/mod.ts";
import "https://deno.land/x/dax@0.24.0/mod.ts";
import "https://deno.land/x/dax@0.25.0/mod.ts";
```

Closes https://github.com/denoland/deno/issues/23860

Changed files:
filename: cli/emit.rs
patch: @@ -7,6 +7,9 @@ use crate::cache::ParsedSourceCache;
 use deno_ast::SourceMapOption;
 use deno_ast::TranspileResult;
 use deno_core::error::AnyError;
+use deno_core::futures::stream::FuturesUnordered;
+use deno_core::futures::FutureExt;
+use deno_core::futures::StreamExt;
 use deno_core::ModuleCodeString;
 use deno_core::ModuleSpecifier;
 use deno_graph::MediaType;
@@ -48,28 +51,37 @@ impl Emitter {
     &self,
     graph: &ModuleGraph,
   ) -> Result<(), AnyError> {
-    // todo(dsherret): we could do this concurrently
+    let mut futures = FuturesUnordered::new();
     for module in graph.modules() {
-      if let Module::Js(module) = module {
-        let is_emittable = matches!(
-          module.media_type,
-          MediaType::TypeScript
-            | MediaType::Mts
-            | MediaType::Cts
-            | MediaType::Jsx
-            | MediaType::Tsx
-        );
-        if is_emittable {
+      let Module::Js(module) = module else {
+        continue;
+      };
+
+      let is_emittable = matches!(
+        module.media_type,
+        MediaType::TypeScript
+          | MediaType::Mts
+          | MediaType::Cts
+          | MediaType::Jsx
+          | MediaType::Tsx
+      );
+      if is_emittable {
+        futures.push(
           self
             .emit_parsed_source(
               &module.specifier,
               module.media_type,
               &module.source,
             )
-            .await?;
-        }
+            .boxed_local(),
+        );
       }
     }
+
+    while let Some(result) = futures.next().await {
+      result?; // surface errors
+    }
+
     Ok(())
   }
Repository: nodejs/node
Pull request: doc: enforce strict policy to semver-major releases

Refs: https://github.com/nodejs/Release/issues/1054

This needs to be discussed first by the @nodejs/releasers. However, since the next session (https://github.com/nodejs/TSC/issues/1648) might not happen due to NodeConf/Collab Summit I thought would be better to discuss it async.

cc: @nodejs/releasers @BethGriggs 

Changed files:
filename: doc/contributing/releases.md
patch: @@ -1217,8 +1217,14 @@ the releaser, these must be kept in sync with `main`.
 The `vN.x` and `vN.x-staging` branches must be kept in sync with one another
 up until the date of the release.
 
-The TSC should be informed of any `SEMVER-MAJOR` commits that land within one
-month of the release.
+If a `SEMVER-MAJOR` pull request lands on the default branch within one month
+prior to the major release date, it must not be included on the new major
+staging branch, unless there is consensus from the Node.js releasers team to
+do so. This measure aims to ensure better stability for the release candidate
+(RC) phase, which begins approximately two weeks prior to the official release.
+By restricting `SEMVER-MAJOR` commits in this period, we provide more time for
+thorough testing and reduce the potential for major breakages, especially in
+LTS lines.
 
 ### Create release labels
Repository: huggingface/transformers
Pull request: Fix torch version guard at import

# What does this PR do?

Fixes #36888 and fixes #36906. As per title, the kwargs we are using (`flatten_with_keys_fn`) are available only from 2.3.0. We can also pin at 2.2.0 and pass it as positional argument, but then `flatten_with_keys_fn` will not be used in torch (from what I can see in torch repo)

Changed files:
filename: src/transformers/cache_utils.py
patch: @@ -585,7 +585,7 @@ def _flatten_dynamic_cache_for_fx(cache, spec):
     return torch.utils._pytree.tree_flatten(dictionary)[0]
 
 
-if is_torch_greater_or_equal("2.2"):
+if is_torch_greater_or_equal("2.3"):
     torch.utils._pytree.register_pytree_node(
         DynamicCache,
         _flatten_dynamic_cache,
Repository: facebook/react
Pull request: [DevTools] Disable sizeBot on DevTools Rull Request

Because DevTools code doesn't affect production bundle size.
Meaningless sizeBot comment give us frastration within Pull Request discussion.

Changed files:
filename: dangerfile.js
patch: @@ -113,6 +113,17 @@ function row(result) {
     return;
   }
 
+  // Disable sizeBot in a Devtools Pull Request. Because that doesn't affect production bundle size.
+  const commitFiles = [
+    ...danger.git.created_files,
+    ...danger.git.deleted_files,
+    ...danger.git.modified_files,
+  ];
+  if (
+    commitFiles.every(filename => filename.includes('packages/react-devtools'))
+  )
+    return;
+
   const resultsMap = new Map();
 
   // Find all the head (current) artifacts paths.
Repository: vercel/next.js
Pull request: Alternate bundler example: use `canary` version

The `latest` version is old and we now canary-gate Rspack support. Some folks are referencing this example now, so make it work using canary.

This can be set back to `latest` once 15.3.0 is published.


Closes PACK-4254

Changed files:
filename: examples/with-rspack/package.json
patch: @@ -11,7 +11,7 @@
     "react-dom": "^18.3.1"
   },
   "devDependencies": {
-    "@next/plugin-rspack": "latest",
+    "@next/plugin-rspack": "canary",
     "@types/node": "^22.10.1",
     "@types/react": "^18.3.12",
     "typescript": "^5.7.2"
Repository: ggml-org/llama.cpp
Pull request: ci: fix SYCL build

It seems debug build flags set by cmake when `-DCMAKE_BUILD_TYPE=Debug` is set breaks the SYCL build.

Different errors on different distros. Disable it in SYCL build and use only release build test.


Changed files:
filename: ci/run.sh
patch: @@ -826,16 +826,20 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
 fi
 
 ret=0
-
-test $ret -eq 0 && gg_run ctest_debug
+if [ -z ${GG_BUILD_SYCL} ]; then
+    # SYCL build breaks with debug build flags
+    test $ret -eq 0 && gg_run ctest_debug
+fi
 test $ret -eq 0 && gg_run ctest_release
 
 if [ -z ${GG_BUILD_LOW_PERF} ]; then
     test $ret -eq 0 && gg_run embd_bge_small
     test $ret -eq 0 && gg_run rerank_tiny
 
     if [ -z ${GG_BUILD_CLOUD} ] || [ ${GG_BUILD_EXTRA_TESTS_0} ]; then
-        test $ret -eq 0 && gg_run test_scripts_debug
+        if [ -z ${GG_BUILD_SYCL} ]; then
+            test $ret -eq 0 && gg_run test_scripts_debug
+        fi
         test $ret -eq 0 && gg_run test_scripts_release
     fi
 
@@ -846,7 +850,9 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
             test $ret -eq 0 && gg_run pythia_2_8b
             #test $ret -eq 0 && gg_run open_llama_7b_v2
         fi
-        test $ret -eq 0 && gg_run ctest_with_model_debug
+        if [ -z ${GG_BUILD_SYCL} ]; then
+            test $ret -eq 0 && gg_run ctest_with_model_debug
+        fi
         test $ret -eq 0 && gg_run ctest_with_model_release
     fi
 fi
Repository: denoland/deno
Pull request: fix(node): stub findSourceMap for `ava`

This stubs `findSourceMap` in `node:module` by always returning `undefined` as if it never found a source map. This unblocks the `ava` test runner.

Fixes https://github.com/denoland/deno/issues/18666

Changed files:
filename: ext/node/polyfills/01_require.js
patch: @@ -1261,6 +1261,15 @@ internals.requireImpl = {
   nativeModuleExports,
 };
 
+/**
+ * @param {string} path
+ * @returns {SourceMap | undefined}
+ */
+export function findSourceMap(_path) {
+  // TODO(@marvinhagemeister): Stub implementation for now to unblock ava
+  return undefined;
+}
+
 export { builtinModules, createRequire, isBuiltin, Module };
 export const _cache = Module._cache;
 export const _extensions = Module._extensions;

filename: tests/unit_node/module_test.ts
patch: @@ -1,6 +1,12 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 
-import { builtinModules, createRequire, isBuiltin, Module } from "node:module";
+import {
+  builtinModules,
+  createRequire,
+  findSourceMap,
+  isBuiltin,
+  Module,
+} from "node:module";
 import { assert, assertEquals } from "@std/assert/mod.ts";
 import process from "node:process";
 import * as path from "node:path";
@@ -88,3 +94,8 @@ Deno.test("[node/module isBuiltin] recognizes node builtins", () => {
 Deno.test("[node/module builtinModules] has 'module' in builtins", () => {
   assert(builtinModules.includes("module"));
 });
+
+// https://github.com/denoland/deno/issues/18666
+Deno.test("[node/module findSourceMap] is a function", () => {
+  assertEquals(findSourceMap("foo"), undefined);
+});
Repository: nodejs/node
Pull request: test: improve test coverage for `ServerResponse`


Changed files:
filename: test/parallel/test-http-write-head.js
patch: @@ -51,6 +51,12 @@ const s = http.createServer(common.mustCall((req, res) => {
     }
   );
 
+  assert.throws(() => {
+    res.writeHead(200, ['invalid', 'headers', 'args']);
+  }, {
+    code: 'ERR_INVALID_ARG_VALUE'
+  });
+
   res.writeHead(200, { Test: '2' });
 
   assert.throws(() => {
@@ -78,7 +84,9 @@ function runTest() {
 
 {
   const server = http.createServer(common.mustCall((req, res) => {
-    res.writeHead(200, [ 'test', '1' ]);
+    res.writeHead(220, [ 'test', '1' ]); // 220 is not a standard status code
+    assert.strictEqual(res.statusMessage, 'unknown');
+
     assert.throws(() => res.writeHead(200, [ 'test2', '2' ]), {
       code: 'ERR_HTTP_HEADERS_SENT',
       name: 'Error',
Repository: denoland/deno
Pull request: fix(node): track `SIG*` listeners in `process.listeners`

Some npm libraries like `signal-exit` rely on the length of the listener array returned by `process.listeners("SIGNT")` to be correct to function. We weren't tracking `SIG*` events there, which broke those npm libraries.

Fixes https://github.com/denoland/deno/issues/22892

Changed files:
filename: ext/node/polyfills/process.ts
patch: @@ -469,6 +469,7 @@ Process.prototype.on = function (
     } else if (event === "SIGTERM" && Deno.build.os === "windows") {
       // Ignores SIGTERM on windows.
     } else {
+      EventEmitter.prototype.on.call(this, event, listener);
       Deno.addSignalListener(event as Deno.Signal, listener);
     }
   } else {
@@ -494,6 +495,7 @@ Process.prototype.off = function (
     } else if (event === "SIGTERM" && Deno.build.os === "windows") {
       // Ignores SIGTERM on windows.
     } else {
+      EventEmitter.prototype.off.call(this, event, listener);
       Deno.removeSignalListener(event as Deno.Signal, listener);
     }
   } else {
@@ -537,6 +539,7 @@ Process.prototype.prependListener = function (
     if (event === "SIGBREAK" && Deno.build.os !== "windows") {
       // Ignores SIGBREAK if the platform is not windows.
     } else {
+      EventEmitter.prototype.prependListener.call(this, event, listener);
       Deno.addSignalListener(event as Deno.Signal, listener);
     }
   } else {

filename: tests/unit_node/process_test.ts
patch: @@ -1108,3 +1108,19 @@ Deno.test({
     process.constructor.call({});
   },
 });
+
+// Test for https://github.com/denoland/deno/issues/22892
+Deno.test("process.listeners - include SIG* events", () => {
+  const listener = () => console.log("SIGINT");
+  process.on("SIGINT", listener);
+  assertEquals(process.listeners("SIGINT").length, 1);
+
+  const listener2 = () => console.log("SIGINT");
+  process.prependListener("SIGINT", listener2);
+  assertEquals(process.listeners("SIGINT").length, 2);
+
+  process.off("SIGINT", listener);
+  assertEquals(process.listeners("SIGINT").length, 1);
+  process.off("SIGINT", listener2);
+  assertEquals(process.listeners("SIGINT").length, 0);
+});
Repository: huggingface/transformers
Pull request: Fix Compressed tensors to_dict_diff

# What does this PR do?
When creating the dict config, checks if the key exists in the defaut config before trying to access its value.
It was causing the error : 
```
File "./transformers/src/transformers/utils/quantization_config.py", line 1364, in to_diff_dict
    if value != default_config_dict[key]:
                ~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 'config_groups'
```



Changed files:
filename: src/transformers/utils/quantization_config.py
patch: @@ -1360,7 +1360,7 @@ def to_diff_dict(self) -> Dict[str, Any]:
 
         # only serialize values that differ from the default config
         for key, value in config_dict.items():
-            if value != default_config_dict[key]:
+            if key not in default_config_dict or value != default_config_dict[key]:
                 serializable_config_dict[key] = value
 
         return serializable_config_dict
Repository: ggml-org/llama.cpp
Pull request: minor: web-ui typo fixes

- Fixed typos in web-ui
- Renamed the variable 'trimedValue' to 'trimmedValue'
- Clarified the confirmation box text

Changed files:
filename: examples/server/webui/src/components/SettingDialog.tsx
patch: @@ -148,13 +148,13 @@ const SETTING_SECTIONS: SettingSection[] = [
     fields: [
       {
         type: SettingInputType.CHECKBOX,
-        label: 'Expand though process by default for generating message',
+        label: 'Expand thought process by default when generating messages',
         key: 'showThoughtInProgress',
       },
       {
         type: SettingInputType.CHECKBOX,
         label:
-          'Exclude thought process when sending request to API (Recommended for DeepSeek-R1)',
+          'Exclude thought process when sending requests to API (Recommended for DeepSeek-R1)',
         key: 'excludeThoughtOnReq',
       },
     ],
@@ -247,7 +247,7 @@ const SETTING_SECTIONS: SettingSection[] = [
               This feature uses{' '}
               <OpenInNewTab href="https://pyodide.org">pyodide</OpenInNewTab>,
               downloaded from CDN. To use this feature, ask the LLM to generate
-              python code inside a markdown code block. You will see a "Run"
+              Python code inside a Markdown code block. You will see a "Run"
               button on the code block, near the "Copy" button.
             </small>
           </>
@@ -274,7 +274,7 @@ export default function SettingDialog({
   );
 
   const resetConfig = () => {
-    if (window.confirm('Are you sure to reset all settings?')) {
+    if (window.confirm('Are you sure you want to reset all settings?')) {
       setLocalConfig(CONFIG_DEFAULT);
     }
   };
@@ -296,9 +296,9 @@ export default function SettingDialog({
           return;
         }
       } else if (mustBeNumeric) {
-        const trimedValue = value.toString().trim();
-        const numVal = Number(trimedValue);
-        if (isNaN(numVal) || !isNumeric(numVal) || trimedValue.length === 0) {
+        const trimmedValue = value.toString().trim();
+        const numVal = Number(trimmedValue);
+        if (isNaN(numVal) || !isNumeric(numVal) || trimmedValue.length === 0) {
           alert(`Value for ${key} must be numeric`);
           return;
         }
Repository: facebook/react
Pull request: Devtools: Display as link if value is in specified protocols

## Summary

First commit to address https://github.com/facebook/react/issues/21827 to make 



Changed files:
filename: packages/react-devtools-shared/src/devtools/views/Components/KeyValue.css
patch: @@ -32,6 +32,14 @@
   flex: 1;
 }
 
+.Link {
+  color: var(--color-link);
+  white-space: pre;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  flex: 1;
+}
+
 .None {
   color: var(--color-dimmer);
   font-style: italic;

filename: packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js
patch: @@ -24,6 +24,7 @@ import styles from './KeyValue.css';
 import Button from 'react-devtools-shared/src/devtools/views/Button';
 import ButtonIcon from 'react-devtools-shared/src/devtools/views/ButtonIcon';
 import {InspectedElementContext} from './InspectedElementContext';
+import {PROTOCOLS_SUPPORTED_AS_LINKS_IN_KEY_VALUE} from './constants';
 
 import type {InspectedElement} from './types';
 import type {Element} from 'react-devtools-shared/src/devtools/views/Components/types';
@@ -243,6 +244,16 @@ export default function KeyValue({
       displayValue = 'undefined';
     }
 
+    let shouldDisplayValueAsLink = false;
+    if (
+      dataType === 'string' &&
+      PROTOCOLS_SUPPORTED_AS_LINKS_IN_KEY_VALUE.some(protocolPrefix =>
+        value.startsWith(protocolPrefix),
+      )
+    ) {
+      shouldDisplayValueAsLink = true;
+    }
+
     children = (
       <div
         key="root"
@@ -259,6 +270,14 @@ export default function KeyValue({
             path={path}
             value={value}
           />
+        ) : shouldDisplayValueAsLink ? (
+          <a
+            className={styles.Link}
+            href={value}
+            target="_blank"
+            rel="noopener noreferrer">
+            {displayValue}
+          </a>
         ) : (
           <span className={styles.Value}>{displayValue}</span>
         )}

filename: packages/react-devtools-shared/src/devtools/views/Components/constants.js
patch: @@ -0,0 +1,6 @@
+export const PROTOCOLS_SUPPORTED_AS_LINKS_IN_KEY_VALUE = [
+  'file:///',
+  'http://',
+  'https://',
+  'vscode://',
+];
Repository: nodejs/node
Pull request: [v20.x] build: pin doc workflow to Node.js 20

To save time, the `.github/workflows/doc.yml` workflow runs with a pre-built Node.js. The switch of `lts/*` to Node.js 22 has broken this workflow for Node.js 20 and 18 due to a mismatch in globals. Pin the version of Node.js back to 20.

Fixes: https://github.com/nodejs/node/issues/55754

---

cc @nodejs/releasers The workflow is broken for both `v18.x-staging` and `v20.x-staging`. I think if we land this on `v20.x-staging` we can cherry-pick this to `v18.x-staging` to fix the workflow there, but if you prefer I can open a `v18.x-staging` targeted PR that pins to Node.js 18 instead.



Changed files:
filename: .github/workflows/doc.yml
patch: @@ -14,7 +14,7 @@ concurrency:
   cancel-in-progress: true
 
 env:
-  NODE_VERSION: lts/*
+  NODE_VERSION: 20
 
 permissions:
   contents: read
Repository: denoland/deno
Pull request: fix: handle signal 0 in process.kill

the last commit had a regression, where it removed this branch, I haven't tested the code  but I think it should work

Changed files:
filename: ext/node/polyfills/process.ts
patch: @@ -259,6 +259,10 @@ memoryUsage.rss = function (): number {
 
 // Returns a negative error code than can be recognized by errnoException
 function _kill(pid: number, sig: number): number {
+  // signal 0 does not exist in constants.os.signals, thats why it have to be handled explicitly
+  if (sig === 0) {
+    return op_node_process_kill(pid, 0);
+  }
   const maybeSignal = Object.entries(constants.os.signals).find((
     [_, numericCode],
   ) => numericCode === sig);

filename: tests/unit_node/process_test.ts
patch: @@ -243,6 +243,11 @@ Deno.test(
       args: ["eval", "setTimeout(() => {}, 10000)"],
     }).spawn();
 
+    // kill with signal 0 should keep the process alive in linux (true means no error happened)
+    // windows ignore signals
+    if (Deno.build.os !== "windows") {
+      assertEquals(process.kill(p.pid, 0), true);
+    }
     process.kill(p.pid);
     await p.status;
   },
Repository: facebook/react
Pull request: react-test-renderer: improve findByType() error message

I noticed that The `findByType()` method throws unhelpful error messages when using a string as the `type` argument. For example:

```
testInstance.findByType('span');
// Expected 1 but found 2 instances with node type: "undefined"
```
I am also running into this when searching for components using `React.memo`. My solution was to use `getComponentName()`. Thanks!


Changed files:
filename: packages/react-test-renderer/src/ReactTestRenderer.js
patch: @@ -42,6 +42,7 @@ import {
   ScopeComponent,
 } from 'shared/ReactWorkTags';
 import invariant from 'shared/invariant';
+import getComponentName from 'shared/getComponentName';
 import ReactVersion from 'shared/ReactVersion';
 
 import {getPublicInstance} from './ReactTestHostConfig';
@@ -346,7 +347,7 @@ class ReactTestInstance {
   findByType(type: any): ReactTestInstance {
     return expectOne(
       this.findAllByType(type, {deep: false}),
-      `with node type: "${type.displayName || type.name}"`,
+      `with node type: "${getComponentName(type) || 'Unknown'}"`,
     );
   }
 

filename: packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.internal.js
patch: @@ -1022,4 +1022,14 @@ describe('ReactTestRenderer', () => {
     expect(Scheduler).toFlushWithoutYielding();
     ReactTestRenderer.create(<App />);
   });
+
+  it('calling findByType() with an invalid component will fall back to "Unknown" for component name', () => {
+    const App = () => null;
+    const renderer = ReactTestRenderer.create(<App />);
+    const NonComponent = {};
+
+    expect(() => {
+      renderer.root.findByType(NonComponent);
+    }).toThrowError(`No instances found with node type: "Unknown"`);
+  });
 });