Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 17: unicode - in strings
- // To do: make all tests pass, leave the assert lines unchanged!
- describe('unicode strings', () => {
- it('are \\u prefixed', () => {
- const nuclear = '\u2622'; //added '' around \u2622
- assert.equal(nuclear, '☢');
- });
- it('value is 4 bytes/digits', () => {
- const nuclear = '\u2622'; //there were extra 2 (in the past u26222)
- assert.equal(`no more ${nuclear}`, 'no more ☢');
- });
- it('value is hexadecimal', () => {
- const nuclear = '\u006E\u006F more \u2622';
- //changed u006B to u006E and u006A to u006F
- assert.equal(nuclear, 'no more ☢');
- });
- it('curly braces may surround the value', () => {
- const nuclear = `\u{0000000006E}\u{00006F} more \u{2622}`;
- //added curly braces around the number after u
- assert.equal(nuclear, 'no more ☢');
- });
- });
Add Comment
Please, Sign In to add comment