---
title: "Unit Testing in GAS Part 5: Testing Objects and Arrays"
author: "Brian Bennett"
date: 2020-02-10T12:31:43+00:00
modified: 2020-02-10T12:31:45+00:00
canonical_url: https://pulse.appsscript.info/p/2020/02/unit-testing-in-gas-part-5-testing-objects-and-arrays/
markdown_url: https://pulse.appsscript.info/p/2020/02/unit-testing-in-gas-part-5-testing-objects-and-arrays.md
categories:
  - "Snippet"
tags:
  - "blog.ohheybrian.com"
description: "It's time to dive into deeper equality situations with objects and arrays. Every test we've written so far has used a non-strict comparison. In other words, we've only been checking value but not type. This is particularly important..."
---

# Unit Testing in GAS Part 5: Testing Objects and Arrays

> It’s time to dive into deeper equality situations with objects and arrays. Every test we’ve written so far has used a non-strict comparison. In other words, we’ve only been checking *value* but not *type*. This is particularly important in JavaScript because of how it handles truthy and falsy values.

The fifth part of a series using the GAS QUnit library to write unit tests for Apps Script projects in the web editor. This post details testing arrays and objects.

Source: *[Unit Testing in GAS Part 5: Testing Objects and Arrays*](https://blog.ohheybrian.com/2020/01/unit-testing-in-gas-part-5-testing-objects-and-arrays/)

---

*Published by [Brian Bennett](https://pulse.appsscript.info/p/author/brianbennett/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2020/02/unit-testing-in-gas-part-5-testing-objects-and-arrays/](https://pulse.appsscript.info/p/2020/02/unit-testing-in-gas-part-5-testing-objects-and-arrays/)*
