diff --git a/test/formatSpec.js b/test/formatSpec.js
index <HASH>..<HASH> 100644
--- a/test/formatSpec.js
+++ b/test/formatSpec.js
@@ -37,8 +37,17 @@ describe("Method as.text", function () {
     it("must correctly convert any text", function () {
 
         expect(pgp.as.text()).toBe("null");
+
+        expect(function(){
+            pgp.as.text(undefined, true);
+        }).toThrow(errors.raw());
+
         expect(pgp.as.text(null)).toBe("null");
 
+        expect(function(){
+            pgp.as.text(null, true);
+        }).toThrow(errors.raw());
+
         expect(pgp.as.text("")).toBe("''");
         expect(pgp.as.text("", true)).toBe(""); // raw-text test;
adding tests for raw-text variables.