Skip to content

Commit

Permalink
#448 Use notation.notation for SAN if possible for writing
Browse files Browse the repository at this point in the history
  • Loading branch information
mliebelt committed May 20, 2023
1 parent 493e056 commit 2986c46
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
18 changes: 9 additions & 9 deletions modules/pgn-reader/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/pgn-reader/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mliebelt/pgn-reader",
"description": "A pgn reader (backend only) to read, understand and play chess games. Used mainly by pgn-viewer.",
"version": "1.2.23",
"version": "1.2.24",
"module": "lib/index.umd.js",
"types": "lib/index.umd.d.ts",
"main": "lib/index.umd.js",
Expand Down Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@mliebelt/pgn-parser": "^1.4.11",
"@mliebelt/pgn-writer": "^1.0.3",
"@mliebelt/pgn-writer": "^1.0.5",
"@mliebelt/pgn-types": "^1.0.4",
"chess.js": "^0.12.1",
"sync-fetch": "^0.3.1"
Expand Down
3 changes: 2 additions & 1 deletion modules/pgn-reader/test/reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ describe("When using all kind of configuration in the reader", function () {
it("should ensure that long notation is written", function (){
reader = new PgnReader({ pgn: 'e4 e5 Nf3 Nc6', notation: 'long'})
should.equal(reader.getMoves().length,4)
should.equal(reader.writePgn({notation: 'long'}),'1. e2-e4 e7-e5 2. Ng1-f3 Nb8-c6')
let res = reader.writePgn({notation: 'long'})
should.equal(res,'1. e2-e4 e7-e5 2. Ng1-f3 Nb8-c6')
})
it("should ensure that different positions are understood", function () {
reader = new PgnReader({pgn: 'e4', position: 'start'})
Expand Down

0 comments on commit 2986c46

Please sign in to comment.