This whole function could have been `assert.deepEqual` I believe.