<commit_before>import 'dart:async';
import 'dart:js';

import 'package:firebase/firebase.dart';
import 'package:scheduled_test/scheduled_test.dart';
import 'package:unittest/html_config.dart';

//const TEST_URL = 'https://dart-test.firebaseio-demo.com/test/';
const TEST_URL = 'https://resplendent-fire-5447.firebaseio.com/';

// Update TEST_URL to a valid URL and update AUTH_KEY to a corresponding
// key to test authentication.
const AUTH_KEY = null;
const INVALID_TOKEN = '<KEY>';

// Update CREDENTAILS_EMAIL to an email address to test
// auth using email/password credentials
const CREDENTIALS_EMAIL = '<EMAIL>';
const CREDENTIALS_PASSWORD = '<PASSWORD>';
const CREDENTIALS_WRONG_PASSWORD = '<PASSWORD>';

final _dateKey = new DateTime.now().toUtc().toIso8601String();
final _testKey = '$_dateKey'.replaceAll(new RegExp(r'[\.]'), '_');

final _testUrl = TEST_URL + _testKey + '/';

void main() {
  useHtmlConfiguration();
  groupSep = ' - ';

  Firebase f;

  setUp(() {
    f = new Firebase(_testUrl);

    currentSchedule.onComplete.schedule(() {
      if (f != null) {
        f.unauth();
        f = null;
      }
    });
  });

  if (AUTH_KEY != null) {
    group('auth-key', () {
      test('bad auth should fail', () {<commit_msg>Disable auth-credentials group tests by default<commit_after>import 'dart:async';
import 'dart:js';

import 'package:firebase/firebase.dart';
import 'package:scheduled_test/scheduled_test.dart';
import 'package:unittest/html_config.dart';

//const TEST_URL = 'https://dart-test.firebaseio-demo.com/test/';
const TEST_URL = 'https://resplendent-fire-5447.firebaseio.com/';

// Update TEST_URL to a valid URL and update AUTH_KEY to a corresponding
// key to test authentication.
const AUTH_KEY = null;
const INVALID_TOKEN = '<KEY>';

// Update CREDENTAILS_EMAIL to an email address to test
// auth using email/password credentials
const CREDENTIALS_EMAIL = null;
const CREDENTIALS_PASSWORD = '<PASSWORD>';
const CREDENTIALS_WRONG_PASSWORD = '<PASSWORD>';

final _dateKey = new DateTime.now().toUtc().toIso8601String();
final _testKey = '$_dateKey'.replaceAll(new RegExp(r'[\.]'), '_');

final _testUrl = TEST_URL + _testKey + '/';

void main() {
  useHtmlConfiguration();
  groupSep = ' - ';

  Firebase f;

  setUp(() {
    f = new Firebase(_testUrl);

    currentSchedule.onComplete.schedule(() {
      if (f != null) {
        f.unauth();
        f = null;
      }
    });
  });

  if (AUTH_KEY != null) {
    group('auth-key', () {
      test('bad auth should fail', () {
{'fraction_non_alphanumeric': 0.1521652761223679, 'fraction_numerical': 0.006356773937226857, 'mean_word_length': 3.9469548133595285, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6293295', 'n_tokens_mistral': 865, 'n_tokens_neox': 850, 'n_words': 197}