From d1a4a65eae6b269cb3f91101555169c80784bb6b Mon Sep 17 00:00:00 2001 From: Daniel Hutzel Date: Fri, 13 Dec 2024 07:17:59 +0100 Subject: [PATCH] reverted accidental push --- test/cds.ql.test.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/cds.ql.test.js b/test/cds.ql.test.js index ea60a341..4ebfe63f 100644 --- a/test/cds.ql.test.js +++ b/test/cds.ql.test.js @@ -672,11 +672,13 @@ describe('cds.ql → cqn', () => { describe(`INSERT...`, () => { test('entries ({a,b}, ...)', () => { const entries = [{ foo: 1 }, { boo: 2 }] - expect(INSERT(...entries).into(Foo).INSERT) - .to.eql(INSERT(entries).into(Foo).INSERT) - .to.eql(INSERT.into(Foo).entries(...entries).INSERT) - .to.eql(INSERT.into(Foo).entries(entries).INSERT) - .to.eql({ into: { ref: ['Foo'] }, entries }) + expect(INSERT(...entries).into(Foo)) + .to.eql(INSERT(entries).into(Foo)) + .to.eql(INSERT.into(Foo).entries(...entries)) + .to.eql(INSERT.into(Foo).entries(entries)) + .to.eql({ + INSERT: { into: { ref: ['Foo'] }, entries }, + }) }) test('rows ([1,2], ...)', () => { @@ -687,9 +689,8 @@ describe('cds.ql → cqn', () => { [1, 2], [3, 4], ]) - .INSERT ) - .to.eql(INSERT.into(Foo).columns('a', 'b').rows([1, 2], [3, 4]).INSERT) + .to.eql(INSERT.into(Foo).columns('a', 'b').rows([1, 2], [3, 4])) .to.eql({ INSERT: { into: { ref: ['Foo'] }, @@ -699,15 +700,15 @@ describe('cds.ql → cqn', () => { [3, 4], ], }, - }.INSERT) + }) }) test('values (1,2)', () => { - expect(INSERT.into(Foo).columns('a', 'b').values([1, 2]).INSERT) - .to.eql(INSERT.into(Foo).columns('a', 'b').values(1, 2).INSERT) + 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: { ref: ['Foo'] }, columns: ['a', 'b'], values: [1, 2] }, - }.INSERT) + }) }) test('w/ plain SQL', () => {