Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3492D45A for ; Tue, 13 Nov 2012 19:13:43 +0000 (UTC) Received: (qmail 20995 invoked by uid 500); 13 Nov 2012 19:13:43 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 20940 invoked by uid 500); 13 Nov 2012 19:13:43 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 20680 invoked by uid 500); 13 Nov 2012 19:13:43 -0000 Delivered-To: apmail-incubator-callback-commits@incubator.apache.org Received: (qmail 20631 invoked by uid 99); 13 Nov 2012 19:13:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 19:13:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CB9AE559B5; Tue, 13 Nov 2012 19:13:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: gtanner@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [16/16] js commit: webworks logger test Message-Id: <20121113191342.CB9AE559B5@tyr.zones.apache.org> Date: Tue, 13 Nov 2012 19:13:42 +0000 (UTC) webworks logger test Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/30e32b95 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/30e32b95 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/30e32b95 Branch: refs/heads/master Commit: 30e32b951d3e46e2094927903ccc9d16577c35f1 Parents: e67e1a8 Author: Matt Lantz Authored: Wed Nov 7 17:32:09 2012 -0500 Committer: Matt Lantz Committed: Wed Nov 7 17:42:19 2012 -0500 ---------------------------------------------------------------------- test/blackberry/webworks/test.logger.js | 36 ++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/30e32b95/test/blackberry/webworks/test.logger.js ---------------------------------------------------------------------- diff --git a/test/blackberry/webworks/test.logger.js b/test/blackberry/webworks/test.logger.js new file mode 100644 index 0000000..38ec7e2 --- /dev/null +++ b/test/blackberry/webworks/test.logger.js @@ -0,0 +1,36 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +describe("logger", function () { + var logger = require('cordova/plugin/webworks/logger'); + + describe("log", function() { + it("should post a console log", function() { + spyOn(console, "log"); + var l = logger.log("Yodalay-Yodalay-Yodalay-Hee-Hoo!"); + + expect(console.log).toHaveBeenCalledWith("Yodalay-Yodalay-Yodalay-Hee-Hoo!"); + expect(l.status).toBe(1); + expect(l.message).toBe('Message logged to console: Yodalay-Yodalay-Yodalay-Hee-Hoo!'); + }); + }); + +});