Skip to content

Commit 97ccbf2

Browse files
committed
FileConventions: add another failing test
Add failing test for DetectUnpinnedNpmPackageInstallVersions function.
1 parent 5bfc801 commit 97ccbf2

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
file-conventions:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Install two npm packages, one with version and the other one without version
11+
run: sudo npm install --save-dev @prettier/plugin-xml prettier@2.4.0

src/FileConventions.Test/FileConventions.Test.fs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,22 @@ let DetectUnpinnedNpmPackageInstallVersions3() =
202202
)
203203

204204

205+
[<Test>]
206+
let DetectUnpinnedNpmPackageInstallVersions4() =
207+
let fileInfo =
208+
(FileInfo(
209+
Path.Combine(
210+
dummyFilesDirectory.FullName,
211+
"DummyCIWithUnpinnedNpmPackageInstallVersion3.yml"
212+
)
213+
))
214+
215+
Assert.That(
216+
DetectUnpinnedNpmPackageInstallVersions fileInfo,
217+
Is.EqualTo true
218+
)
219+
220+
205221
[<Test>]
206222
let DetectAsteriskInPackageReferenceItems1() =
207223
let fileInfo =

0 commit comments

Comments
 (0)