Skip to content

Commit

Permalink
test: add more test cases for isPackageJson function (#761)
Browse files Browse the repository at this point in the history
<!-- πŸ‘‹ Hi, thanks for sending a PR to eslint-plugin-package-json! πŸ’–.
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

-   [ ] Addresses an existing open issue: fixes #000
- [ ] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [ ] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

<!-- Description of what is changed and how the code change does that.
-->

I had developed some vscode extensions. I will add some json files like
`package.nls.json` or `package.nls.zh-cn.json` for internationalization
support. So I add more test cases.


![screenshot of file list with variations of package.json files circled](https://github.com/user-attachments/assets/b1c425f8-3c38-4899-8dfb-2f1fcc1d3f55)
  • Loading branch information
chouchouji authored Jan 21, 2025
1 parent d1ca387 commit 8618a01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/isPackageJson.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ describe("isPackageJson", () => {
["-package.json", false],
["prefix-package.json", false],
["package.json.json", false],
["package.nls.json", false],
["package.nls.zh-cn.json", false],
["package.package.json", false],
["package.json.package.json", false],
["package.json-package.json", false],
Expand Down

0 comments on commit 8618a01

Please sign in to comment.