Skip to content

Commit

Permalink
Intentionally cause a failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire committed Dec 16, 2022
1 parent 18668c1 commit 7c8adb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions packages/address-book-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.1]
### Changed
- Relax dependencies on `@metamask/base-controller` and `@metamask/controller-utils` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/controllers/pull/998))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AddressBookController } from './AddressBookController';
describe('AddressBookController', () => {
it('should set default state', () => {
const controller = new AddressBookController();
expect(controller.state).toStrictEqual({ addressBook: {} });
expect(controller.state).toBe('oops');
});

it('should add a contact entry', () => {
Expand Down Expand Up @@ -203,26 +203,26 @@ describe('AddressBookController', () => {
const controller = new AddressBookController();
expect(
controller.set('0x32Be343B94f860124dC4fEe278FDCBD38C102D88', 'foo'),
).toStrictEqual(true);
).toBe(true);
});

it('should return false to indicate an address book entry has NOT been added', () => {
const controller = new AddressBookController();
expect(controller.set('0x00', 'foo')).toStrictEqual(false);
expect(controller.set('0x00', 'foo')).toBe(false);
});

it('should return true to indicate an address book entry has been deleted', () => {
const controller = new AddressBookController();
controller.set('0x32Be343B94f860124dC4fEe278FDCBD38C102D88', 'foo');
expect(
controller.delete('1', '0x32Be343B94f860124dC4fEe278FDCBD38C102D88'),
).toStrictEqual(true);
).toBe(true);
});

it('should return false to indicate an address book entry has NOT been deleted', () => {
const controller = new AddressBookController();
controller.set('0x32Be343B94f860124dC4fEe278FDCBD38C102D88', '0x00');
expect(controller.delete('1', '0x01')).toStrictEqual(false);
expect(controller.delete('1', '0x01')).toBe(false);
});

it('should normalize addresses so adding and removing entries work across casings', () => {
Expand Down

0 comments on commit 7c8adb2

Please sign in to comment.