Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dots in identifiers #27

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Eternal-Rise
Copy link

#19

  • tests and linter show no problems (npm t)
  • tests are added/updated for bug fixes and new features
  • code is properly formatted (npm run fmt)
  • description of changes is added in CHANGELOG.md
  • update .d.ts typings

Basic solution for current test case

lib/sheet.js Outdated Show resolved Hide resolved
lib/sheet.js Outdated Show resolved Hide resolved
lib/sheet.js Outdated Show resolved Hide resolved
lib/sheet.js Outdated Show resolved Hide resolved
@Eternal-Rise
Copy link
Author

@tshemsedinov , fixed. While testing, found a bug with metatests. I'll create an issue.
metarhia/metatests#269

Copy link
Member

@tshemsedinov tshemsedinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more test cases

@Eternal-Rise
Copy link
Author

Eternal-Rise commented Aug 10, 2022

@tshemsedinov , added a few and I have a question. Should we return an object in that case?

metatests.test('Read deep non-table identifiers', async (test) => {
  const sheet = new Sheet();

  sheet.cells['item.price.usd'] = 100;
  sheet.cells['item.price.uah'] = 200;
  test.strictSame(sheet.values['item.price'], { usd: 100, uah: 200 });

  test.end();
});

And I broke metatests again. That test case passed for some reason. And if we place any check after it, it will pass too.

test.strictSame(sheet.values['item.price'], { usd: 100, uah: 200 });  // -> not fails
test.strictSame(1, 0) // -> obviously, should fail, but it isn't

Created an issue metarhia/metatests#270

@Eternal-Rise Eternal-Rise changed the title Feature: support dots in identifiers WIP: Support dots in identifiers Aug 10, 2022
lib/sheet.js Outdated Show resolved Hide resolved
@Eternal-Rise Eternal-Rise changed the title WIP: Support dots in identifiers Support dots in identifiers Aug 11, 2022
@Eternal-Rise Eternal-Rise force-pushed the feature/support-dots-in-identifiers branch from 3d8950e to 9573b72 Compare August 11, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants