Quirks mode is gone w/ cds8 (#729)

* Quirks mode is gone w/ cds8

* Update test/cds.ql.test.js

* Updated package-lock.json
This commit is contained in:
Daniel Hutzel
2024-07-15 14:16:10 +02:00
committed by GitHub
parent cae0d36206
commit 09f02676ef
2 changed files with 3703 additions and 3412 deletions

7101
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -677,7 +677,7 @@ describe('cds.ql → cqn', () => {
.to.eql(INSERT.into(Foo).entries(...entries))
.to.eql(INSERT.into(Foo).entries(entries))
.to.eql({
INSERT: { into: cds.env.ql.quirks_mode ? 'Foo' : { ref: ['Foo'] }, entries },
INSERT: { into: { ref: ['Foo'] }, entries },
})
})
@@ -693,7 +693,7 @@ describe('cds.ql → cqn', () => {
.to.eql(INSERT.into(Foo).columns('a', 'b').rows([1, 2], [3, 4]))
.to.eql({
INSERT: {
into: cds.env.ql.quirks_mode ? 'Foo' : { ref: ['Foo'] },
into: { ref: ['Foo'] },
columns: ['a', 'b'],
rows: [
[1, 2],
@@ -707,7 +707,7 @@ describe('cds.ql → cqn', () => {
expect(INSERT.into(Foo).columns('a', 'b').values([1, 2]))
.to.eql(INSERT.into(Foo).columns('a', 'b').values(1, 2))
.to.eql({
INSERT: { into: cds.env.ql.quirks_mode ? 'Foo' : { ref: ['Foo'] }, columns: ['a', 'b'], values: [1, 2] },
INSERT: { into: { ref: ['Foo'] }, columns: ['a', 'b'], values: [1, 2] },
})
})
@@ -722,7 +722,7 @@ describe('cds.ql → cqn', () => {
test('entity (..., <key>)', () => {
const cqnWhere = {
UPDATE: {
entity: cds.env.ql.quirks_mode ? 'capire.bookshop.Books' : { ref: ['capire.bookshop.Books'] },
entity: { ref: ['capire.bookshop.Books'] },
where: [{ ref: ['ID'] }, '=', { val: 4711 }],
},
}
@@ -766,7 +766,7 @@ describe('cds.ql → cqn', () => {
.to.eql(UPDATE(Foo).with({ foo: 11, bar: { '-=': 22 } }))
.to.eql({
UPDATE: {
entity: cds.env.ql.quirks_mode ? 'Foo' : { ref: ['Foo'] },
entity: { ref: ['Foo'] },
data: { foo: 11 },
with: {
bar: { xpr: [{ ref: ['bar'] }, '-', { val: 22 }] },
@@ -777,7 +777,7 @@ describe('cds.ql → cqn', () => {
// some more
expect(UPDATE(Foo).with(`bar = coalesce(x,y), car = 'foo''s bar, car'`)).to.eql({
UPDATE: {
entity: cds.env.ql.quirks_mode ? 'Foo' : { ref: ['Foo'] },
entity: { ref: ['Foo'] },
data: {
car: "foo's bar, car",
},
@@ -797,7 +797,7 @@ describe('cds.ql → cqn', () => {
test('from (..., <key>)', () => {
const cqnWhere = {
DELETE: {
from: cds.env.ql.quirks_mode ? 'capire.bookshop.Books' : { ref: ['capire.bookshop.Books'] },
from: { ref: ['capire.bookshop.Books'] },
where: [{ ref: ['ID'] }, '=', { val: 4711 }],
},
}