Skip to content

Commit

Permalink
test: add more snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jun 15, 2024
1 parent a4e4c65 commit ca78c81
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 25 deletions.
4 changes: 4 additions & 0 deletions test/model-x.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ test('Tesla Model X P100D 2016', t => {
test('Tesla Model X 90D 2016', t => {
t.snapshot(vinDecoder('5YJXCCE24GF009944'))
})

test('Tesla Model X Plaid 2023', t => {
t.snapshot(vinDecoder('7SAXCCE67PF384216'))
})
25 changes: 1 addition & 24 deletions test/model-y.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,10 @@ const test = require('ava')

const vinDecoder = require('../src')

test.todo('Freemont')

test.todo('Freemont/Austin')

test.skip('Shangai', t => {
// t.deepEqual(vinDecoder('LRWYGCEK9NC220895'), {
// model: 'Y',
// bodyType: 'MPV 5 DR / LHD',
// worldManufacturingIdentifier: 'Shanghai',
// restraintSystems:
// 'Type 2 Manual seatbelts with front Airbags, PODS, side Inflatable restraints',
// fuelType:
// 'Electric (Fremont-built vehicles), Ternary System Li-ion battery (Giga Shanghai-built vehicles)',
// motor: 'Dual Motor Standard',
// year: '2022',
// PlantOFManufacture: 'Tesla China (Giga Shanghai)'
// })
})

test('Berlin', t => {
test('Tesla Model Y Standard Range 2024', t => {
t.snapshot(vinDecoder('XP7YGCES4RB382301'))
})

test.skip('long VINs', t => {
t.snapshot(vinDecoder('LRWY258_d4752fcc6aa867bb533fa6d2c61a2586'))
})

test('Tesla Model Y Long Range AWD 2021', t => {
t.snapshot(vinDecoder('5YJYGDEE4MF067850'))
})
24 changes: 24 additions & 0 deletions test/snapshots/model-x.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,27 @@ Generated by [AVA](https://avajs.dev).
worldManufacturingIdentifier: 'Fremont, California',
year: 2016,
}

## Tesla Model X Plaid 2023

> Snapshot 1
{
bateryType: 'Nickel Manganese Cobalt (NMC)',
bodyType: 'Class E MPV 5 DR / LHD',
model: 'Tesla Model X',
motor: 'Triple Motor',
photos: [
'https://teslahunt.github.io/tesla-vin/images/X/4.jpeg',
'https://teslahunt.github.io/tesla-vin/images/X/5.jpeg',
'https://teslahunt.github.io/tesla-vin/images/X/6.jpeg',
],
plantOfManufacture: 'Tesla Fremont, California (USA)',
restraintSystems: 'Type 2 Manual seatbelts with front Airbags, PODS, side Inflatable restraints',
sequenceNumber: {
name: null,
value: 384216,
},
worldManufacturingIdentifier: 'Austin, Texas',
year: 2023,
}
Binary file modified test/snapshots/model-x.js.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion test/snapshots/model-y.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The actual snapshot is saved in `model-y.js.snap`.

Generated by [AVA](https://avajs.dev).

## Berlin
## Tesla Model Y Standard Range 2024

> Snapshot 1
Expand Down
Binary file modified test/snapshots/model-y.js.snap
Binary file not shown.

0 comments on commit ca78c81

Please sign in to comment.