Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Feb 20, 2024
1 parent 495f5cd commit 8243cbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ mod tests {
import type { Component } from "https://esm.sh/preact";
import { h, Fragment } from "https://esm.sh/preact";
// other
// @deno-types="https://deno.land/x/types/react/index.d.ts";
import React from "https://cdn.skypack.dev/react";
Expand Down Expand Up @@ -644,6 +645,10 @@ mod tests {
text_info.range_text(&dep_deno_types.range.as_source_range(text_info)),
r#""https://deno.land/x/types/react/index.d.ts""#
);
assert_eq!(
dependencies[4].as_static().unwrap().leading_comments.len(),
1
);

let jsx_import_source = module_info.jsx_import_source.unwrap();
assert_eq!(jsx_import_source.text, "http://example.com/preact");
Expand Down

0 comments on commit 8243cbf

Please sign in to comment.