mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
10 lines
158 B
JavaScript
10 lines
158 B
JavaScript
class Ref {
|
|
static nextId = 0
|
|
constructor(id = ++Ref.nextId, n = id) {
|
|
this.id = n
|
|
}
|
|
}
|
|
|
|
expect(new Ref().id).toBe(1);
|
|
expect(new Ref().id).toBe(2);
|